File manager - Edit - /var/www/payraty/helpdesk/public/storage/branding_media/images/SQL.zip
Back
PK ! �P�� � Parser/Visitor.phpnu ȯ�� <?php namespace Doctrine\DBAL\SQL\Parser; /** * SQL parser visitor * * @internal */ interface Visitor { /** * Accepts an SQL fragment containing a positional parameter */ public function acceptPositionalParameter(string $sql): void; /** * Accepts an SQL fragment containing a named parameter */ public function acceptNamedParameter(string $sql): void; /** * Accepts other SQL fragments */ public function acceptOther(string $sql): void; } PK ! D�%� � + Parser/Exception/RegularExpressionError.phpnu ȯ�� <?php declare(strict_types=1); namespace Doctrine\DBAL\SQL\Parser\Exception; use Doctrine\DBAL\SQL\Parser\Exception; use RuntimeException; use function preg_last_error; use function preg_last_error_msg; class RegularExpressionError extends RuntimeException implements Exception { public static function new(): self { return new self(preg_last_error_msg(), preg_last_error()); } } PK ! L�*� � Parser/Exception.phpnu ȯ�� <?php declare(strict_types=1); namespace Doctrine\DBAL\SQL\Parser; use Throwable; interface Exception extends Throwable { } PK ! �SbΘ � ) Builder/CreateSchemaObjectsSQLBuilder.phpnu ȯ�� <?php namespace Doctrine\DBAL\SQL\Builder; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\Table; use function array_merge; final class CreateSchemaObjectsSQLBuilder { private AbstractPlatform $platform; public function __construct(AbstractPlatform $platform) { $this->platform = $platform; } /** * @return list<string> * * @throws Exception */ public function buildSQL(Schema $schema): array { return array_merge( $this->buildNamespaceStatements($schema->getNamespaces()), $this->buildSequenceStatements($schema->getSequences()), $this->buildTableStatements($schema->getTables()), ); } /** * @param list<string> $namespaces * * @return list<string> * * @throws Exception */ private function buildNamespaceStatements(array $namespaces): array { $statements = []; if ($this->platform->supportsSchemas()) { foreach ($namespaces as $namespace) { $statements[] = $this->platform->getCreateSchemaSQL($namespace); } } return $statements; } /** * @param list<Table> $tables * * @return list<string> * * @throws Exception */ private function buildTableStatements(array $tables): array { return $this->platform->getCreateTablesSQL($tables); } /** * @param list<Sequence> $sequences * * @return list<string> * * @throws Exception */ private function buildSequenceStatements(array $sequences): array { $statements = []; foreach ($sequences as $sequence) { $statements[] = $this->platform->getCreateSequenceSQL($sequence); } return $statements; } } PK ! �cC�� � Builder/SelectSQLBuilder.phpnu ȯ�� <?php namespace Doctrine\DBAL\SQL\Builder; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Query\SelectQuery; interface SelectSQLBuilder { /** @throws Exception */ public function buildSQL(SelectQuery $query): string; } PK ! w��c� � # Builder/DefaultSelectSQLBuilder.phpnu ȯ�� <?php namespace Doctrine\DBAL\SQL\Builder; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Query\ForUpdate\ConflictResolutionMode; use Doctrine\DBAL\Query\SelectQuery; use function count; use function implode; final class DefaultSelectSQLBuilder implements SelectSQLBuilder { private AbstractPlatform $platform; private ?string $forUpdateSQL; private ?string $skipLockedSQL; /** @internal The SQL builder should be instantiated only by database platforms. */ public function __construct(AbstractPlatform $platform, ?string $forUpdateSQL, ?string $skipLockedSQL) { $this->platform = $platform; $this->forUpdateSQL = $forUpdateSQL; $this->skipLockedSQL = $skipLockedSQL; } /** @throws Exception */ public function buildSQL(SelectQuery $query): string { $parts = ['SELECT']; if ($query->isDistinct()) { $parts[] = 'DISTINCT'; } $parts[] = implode(', ', $query->getColumns()); $from = $query->getFrom(); if (count($from) > 0) { $parts[] = 'FROM ' . implode(', ', $from); } $where = $query->getWhere(); if ($where !== null) { $parts[] = 'WHERE ' . $where; } $groupBy = $query->getGroupBy(); if (count($groupBy) > 0) { $parts[] = 'GROUP BY ' . implode(', ', $groupBy); } $having = $query->getHaving(); if ($having !== null) { $parts[] = 'HAVING ' . $having; } $orderBy = $query->getOrderBy(); if (count($orderBy) > 0) { $parts[] = 'ORDER BY ' . implode(', ', $orderBy); } $sql = implode(' ', $parts); $limit = $query->getLimit(); if ($limit->isDefined()) { $sql = $this->platform->modifyLimitQuery($sql, $limit->getMaxResults(), $limit->getFirstResult()); } $forUpdate = $query->getForUpdate(); if ($forUpdate !== null) { if ($this->forUpdateSQL === null) { throw Exception::notSupported('FOR UPDATE'); } $sql .= ' ' . $this->forUpdateSQL; if ($forUpdate->getConflictResolutionMode() === ConflictResolutionMode::SKIP_LOCKED) { if ($this->skipLockedSQL === null) { throw Exception::notSupported('SKIP LOCKED'); } $sql .= ' ' . $this->skipLockedSQL; } } return $sql; } } PK ! �@!W W '