Laravel version update
Laravel version update
This commit is contained in:
3662
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
vendored
Normal file
3662
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
913
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DB2Platform.php
vendored
Normal file
913
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DB2Platform.php
vendored
Normal file
@@ -0,0 +1,913 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
use Doctrine\DBAL\DBALException;
|
||||
use Doctrine\DBAL\Schema\ColumnDiff;
|
||||
use Doctrine\DBAL\Schema\Identifier;
|
||||
use Doctrine\DBAL\Schema\Index;
|
||||
use Doctrine\DBAL\Schema\Table;
|
||||
use Doctrine\DBAL\Schema\TableDiff;
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
use function array_merge;
|
||||
use function count;
|
||||
use function current;
|
||||
use function explode;
|
||||
use function func_get_arg;
|
||||
use function func_num_args;
|
||||
use function implode;
|
||||
use function sprintf;
|
||||
use function strpos;
|
||||
use function strtoupper;
|
||||
|
||||
class DB2Platform extends AbstractPlatform
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCharMaxLength() : int
|
||||
{
|
||||
return 254;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBinaryMaxLength()
|
||||
{
|
||||
return 32704;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBinaryDefaultLength()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getVarcharTypeDeclarationSQL(array $field)
|
||||
{
|
||||
// for IBM DB2, the CHAR max length is less than VARCHAR default length
|
||||
if (! isset($field['length']) && ! empty($field['fixed'])) {
|
||||
$field['length'] = $this->getCharMaxLength();
|
||||
}
|
||||
|
||||
return parent::getVarcharTypeDeclarationSQL($field);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getBlobTypeDeclarationSQL(array $field)
|
||||
{
|
||||
// todo blob(n) with $field['length'];
|
||||
return 'BLOB(1M)';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function initializeDoctrineTypeMappings()
|
||||
{
|
||||
$this->doctrineTypeMapping = [
|
||||
'smallint' => 'smallint',
|
||||
'bigint' => 'bigint',
|
||||
'integer' => 'integer',
|
||||
'time' => 'time',
|
||||
'date' => 'date',
|
||||
'varchar' => 'string',
|
||||
'character' => 'string',
|
||||
'varbinary' => 'binary',
|
||||
'binary' => 'binary',
|
||||
'clob' => 'text',
|
||||
'blob' => 'blob',
|
||||
'decimal' => 'decimal',
|
||||
'double' => 'float',
|
||||
'real' => 'float',
|
||||
'timestamp' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function isCommentedDoctrineType(Type $doctrineType)
|
||||
{
|
||||
if ($doctrineType->getName() === Type::BOOLEAN) {
|
||||
// We require a commented boolean type in order to distinguish between boolean and smallint
|
||||
// as both (have to) map to the same native type.
|
||||
return true;
|
||||
}
|
||||
|
||||
return parent::isCommentedDoctrineType($doctrineType);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed)
|
||||
{
|
||||
return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(254)')
|
||||
: ($length ? 'VARCHAR(' . $length . ')' : 'VARCHAR(255)');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed)
|
||||
{
|
||||
return $this->getVarcharTypeDeclarationSQLSnippet($length, $fixed) . ' FOR BIT DATA';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getClobTypeDeclarationSQL(array $field)
|
||||
{
|
||||
// todo clob(n) with $field['length'];
|
||||
return 'CLOB(1M)';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'db2';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getBooleanTypeDeclarationSQL(array $columnDef)
|
||||
{
|
||||
return 'SMALLINT';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getIntegerTypeDeclarationSQL(array $columnDef)
|
||||
{
|
||||
return 'INTEGER' . $this->_getCommonIntegerTypeDeclarationSQL($columnDef);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getBigIntTypeDeclarationSQL(array $columnDef)
|
||||
{
|
||||
return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($columnDef);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getSmallIntTypeDeclarationSQL(array $columnDef)
|
||||
{
|
||||
return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($columnDef);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef)
|
||||
{
|
||||
$autoinc = '';
|
||||
if ( ! empty($columnDef['autoincrement'])) {
|
||||
$autoinc = ' GENERATED BY DEFAULT AS IDENTITY';
|
||||
}
|
||||
|
||||
return $autoinc;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBitAndComparisonExpression($value1, $value2)
|
||||
{
|
||||
return 'BITAND(' . $value1 . ', ' . $value2 . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBitOrComparisonExpression($value1, $value2)
|
||||
{
|
||||
return 'BITOR(' . $value1 . ', ' . $value2 . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit)
|
||||
{
|
||||
switch ($unit) {
|
||||
case DateIntervalUnit::WEEK:
|
||||
$interval *= 7;
|
||||
$unit = DateIntervalUnit::DAY;
|
||||
break;
|
||||
|
||||
case DateIntervalUnit::QUARTER:
|
||||
$interval *= 3;
|
||||
$unit = DateIntervalUnit::MONTH;
|
||||
break;
|
||||
}
|
||||
|
||||
return $date . ' ' . $operator . ' ' . $interval . ' ' . $unit;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getDateDiffExpression($date1, $date2)
|
||||
{
|
||||
return 'DAYS(' . $date1 . ') - DAYS(' . $date2 . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration)
|
||||
{
|
||||
if (isset($fieldDeclaration['version']) && $fieldDeclaration['version'] == true) {
|
||||
return "TIMESTAMP(0) WITH DEFAULT";
|
||||
}
|
||||
|
||||
return 'TIMESTAMP(0)';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDateTypeDeclarationSQL(array $fieldDeclaration)
|
||||
{
|
||||
return 'DATE';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
|
||||
{
|
||||
return 'TIME';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getTruncateTableSQL($tableName, $cascade = false)
|
||||
{
|
||||
$tableIdentifier = new Identifier($tableName);
|
||||
|
||||
return 'TRUNCATE ' . $tableIdentifier->getQuotedName($this) . ' IMMEDIATE';
|
||||
}
|
||||
|
||||
/**
|
||||
* This code fragment is originally from the Zend_Db_Adapter_Db2 class, but has been edited.
|
||||
*
|
||||
* @license New BSD License
|
||||
*
|
||||
* @param string $table
|
||||
* @param string $database
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getListTableColumnsSQL($table, $database = null)
|
||||
{
|
||||
$table = $this->quoteStringLiteral($table);
|
||||
|
||||
// We do the funky subquery and join syscat.columns.default this crazy way because
|
||||
// as of db2 v10, the column is CLOB(64k) and the distinct operator won't allow a CLOB,
|
||||
// it wants shorter stuff like a varchar.
|
||||
return "
|
||||
SELECT
|
||||
cols.default,
|
||||
subq.*
|
||||
FROM (
|
||||
SELECT DISTINCT
|
||||
c.tabschema,
|
||||
c.tabname,
|
||||
c.colname,
|
||||
c.colno,
|
||||
c.typename,
|
||||
c.nulls,
|
||||
c.length,
|
||||
c.scale,
|
||||
c.identity,
|
||||
tc.type AS tabconsttype,
|
||||
c.remarks AS comment,
|
||||
k.colseq,
|
||||
CASE
|
||||
WHEN c.generated = 'D' THEN 1
|
||||
ELSE 0
|
||||
END AS autoincrement
|
||||
FROM syscat.columns c
|
||||
LEFT JOIN (syscat.keycoluse k JOIN syscat.tabconst tc
|
||||
ON (k.tabschema = tc.tabschema
|
||||
AND k.tabname = tc.tabname
|
||||
AND tc.type = 'P'))
|
||||
ON (c.tabschema = k.tabschema
|
||||
AND c.tabname = k.tabname
|
||||
AND c.colname = k.colname)
|
||||
WHERE UPPER(c.tabname) = UPPER(" . $table . ")
|
||||
ORDER BY c.colno
|
||||
) subq
|
||||
JOIN syscat.columns cols
|
||||
ON subq.tabschema = cols.tabschema
|
||||
AND subq.tabname = cols.tabname
|
||||
AND subq.colno = cols.colno
|
||||
ORDER BY subq.colno
|
||||
";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getListTablesSQL()
|
||||
{
|
||||
return "SELECT NAME FROM SYSIBM.SYSTABLES WHERE TYPE = 'T'";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getListViewsSQL($database)
|
||||
{
|
||||
return "SELECT NAME, TEXT FROM SYSIBM.SYSVIEWS";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getListTableIndexesSQL($table, $currentDatabase = null)
|
||||
{
|
||||
$table = $this->quoteStringLiteral($table);
|
||||
|
||||
return "SELECT idx.INDNAME AS key_name,
|
||||
idxcol.COLNAME AS column_name,
|
||||
CASE
|
||||
WHEN idx.UNIQUERULE = 'P' THEN 1
|
||||
ELSE 0
|
||||
END AS primary,
|
||||
CASE
|
||||
WHEN idx.UNIQUERULE = 'D' THEN 1
|
||||
ELSE 0
|
||||
END AS non_unique
|
||||
FROM SYSCAT.INDEXES AS idx
|
||||
JOIN SYSCAT.INDEXCOLUSE AS idxcol
|
||||
ON idx.INDSCHEMA = idxcol.INDSCHEMA AND idx.INDNAME = idxcol.INDNAME
|
||||
WHERE idx.TABNAME = UPPER(" . $table . ")
|
||||
ORDER BY idxcol.COLSEQ ASC";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getListTableForeignKeysSQL($table)
|
||||
{
|
||||
$table = $this->quoteStringLiteral($table);
|
||||
|
||||
return "SELECT fkcol.COLNAME AS local_column,
|
||||
fk.REFTABNAME AS foreign_table,
|
||||
pkcol.COLNAME AS foreign_column,
|
||||
fk.CONSTNAME AS index_name,
|
||||
CASE
|
||||
WHEN fk.UPDATERULE = 'R' THEN 'RESTRICT'
|
||||
ELSE NULL
|
||||
END AS on_update,
|
||||
CASE
|
||||
WHEN fk.DELETERULE = 'C' THEN 'CASCADE'
|
||||
WHEN fk.DELETERULE = 'N' THEN 'SET NULL'
|
||||
WHEN fk.DELETERULE = 'R' THEN 'RESTRICT'
|
||||
ELSE NULL
|
||||
END AS on_delete
|
||||
FROM SYSCAT.REFERENCES AS fk
|
||||
JOIN SYSCAT.KEYCOLUSE AS fkcol
|
||||
ON fk.CONSTNAME = fkcol.CONSTNAME
|
||||
AND fk.TABSCHEMA = fkcol.TABSCHEMA
|
||||
AND fk.TABNAME = fkcol.TABNAME
|
||||
JOIN SYSCAT.KEYCOLUSE AS pkcol
|
||||
ON fk.REFKEYNAME = pkcol.CONSTNAME
|
||||
AND fk.REFTABSCHEMA = pkcol.TABSCHEMA
|
||||
AND fk.REFTABNAME = pkcol.TABNAME
|
||||
WHERE fk.TABNAME = UPPER(" . $table . ")
|
||||
ORDER BY fkcol.COLSEQ ASC";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getCreateViewSQL($name, $sql)
|
||||
{
|
||||
return "CREATE VIEW ".$name." AS ".$sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDropViewSQL($name)
|
||||
{
|
||||
return "DROP VIEW ".$name;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getCreateDatabaseSQL($database)
|
||||
{
|
||||
return "CREATE DATABASE ".$database;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDropDatabaseSQL($database)
|
||||
{
|
||||
return "DROP DATABASE " . $database;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function supportsCreateDropDatabase()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function supportsReleaseSavepoints()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supportsCommentOnStatement()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getCurrentDateSQL()
|
||||
{
|
||||
return 'CURRENT DATE';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getCurrentTimeSQL()
|
||||
{
|
||||
return 'CURRENT TIME';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getCurrentTimestampSQL()
|
||||
{
|
||||
return "CURRENT TIMESTAMP";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getIndexDeclarationSQL($name, Index $index)
|
||||
{
|
||||
// Index declaration in statements like CREATE TABLE is not supported.
|
||||
throw DBALException::notSupported(__METHOD__);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function _getCreateTableSQL($tableName, array $columns, array $options = [])
|
||||
{
|
||||
$indexes = [];
|
||||
if (isset($options['indexes'])) {
|
||||
$indexes = $options['indexes'];
|
||||
}
|
||||
$options['indexes'] = [];
|
||||
|
||||
$sqls = parent::_getCreateTableSQL($tableName, $columns, $options);
|
||||
|
||||
foreach ($indexes as $definition) {
|
||||
$sqls[] = $this->getCreateIndexSQL($definition, $tableName);
|
||||
}
|
||||
return $sqls;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getAlterTableSQL(TableDiff $diff)
|
||||
{
|
||||
$sql = [];
|
||||
$columnSql = [];
|
||||
$commentsSQL = [];
|
||||
|
||||
$queryParts = [];
|
||||
foreach ($diff->addedColumns as $column) {
|
||||
if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$columnDef = $column->toArray();
|
||||
$queryPart = 'ADD COLUMN ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnDef);
|
||||
|
||||
// Adding non-nullable columns to a table requires a default value to be specified.
|
||||
if ( ! empty($columnDef['notnull']) &&
|
||||
! isset($columnDef['default']) &&
|
||||
empty($columnDef['autoincrement'])
|
||||
) {
|
||||
$queryPart .= ' WITH DEFAULT';
|
||||
}
|
||||
|
||||
$queryParts[] = $queryPart;
|
||||
|
||||
$comment = $this->getColumnComment($column);
|
||||
|
||||
if (null !== $comment && '' !== $comment) {
|
||||
$commentsSQL[] = $this->getCommentOnColumnSQL(
|
||||
$diff->getName($this)->getQuotedName($this),
|
||||
$column->getQuotedName($this),
|
||||
$comment
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($diff->removedColumns as $column) {
|
||||
if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$queryParts[] = 'DROP COLUMN ' . $column->getQuotedName($this);
|
||||
}
|
||||
|
||||
foreach ($diff->changedColumns as $columnDiff) {
|
||||
if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($columnDiff->hasChanged('comment')) {
|
||||
$commentsSQL[] = $this->getCommentOnColumnSQL(
|
||||
$diff->getName($this)->getQuotedName($this),
|
||||
$columnDiff->column->getQuotedName($this),
|
||||
$this->getColumnComment($columnDiff->column)
|
||||
);
|
||||
|
||||
if (count($columnDiff->changedProperties) === 1) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$this->gatherAlterColumnSQL($diff->fromTable, $columnDiff, $sql, $queryParts);
|
||||
}
|
||||
|
||||
foreach ($diff->renamedColumns as $oldColumnName => $column) {
|
||||
if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$oldColumnName = new Identifier($oldColumnName);
|
||||
|
||||
$queryParts[] = 'RENAME COLUMN ' . $oldColumnName->getQuotedName($this) .
|
||||
' TO ' . $column->getQuotedName($this);
|
||||
}
|
||||
|
||||
$tableSql = [];
|
||||
|
||||
if ( ! $this->onSchemaAlterTable($diff, $tableSql)) {
|
||||
if (count($queryParts) > 0) {
|
||||
$sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . implode(" ", $queryParts);
|
||||
}
|
||||
|
||||
// Some table alteration operations require a table reorganization.
|
||||
if ( ! empty($diff->removedColumns) || ! empty($diff->changedColumns)) {
|
||||
$sql[] = "CALL SYSPROC.ADMIN_CMD ('REORG TABLE " . $diff->getName($this)->getQuotedName($this) . "')";
|
||||
}
|
||||
|
||||
$sql = array_merge($sql, $commentsSQL);
|
||||
|
||||
if ($diff->newName !== false) {
|
||||
$sql[] = 'RENAME TABLE ' . $diff->getName($this)->getQuotedName($this) . ' TO ' . $diff->getNewName()->getQuotedName($this);
|
||||
}
|
||||
|
||||
$sql = array_merge(
|
||||
$this->getPreAlterTableIndexForeignKeySQL($diff),
|
||||
$sql,
|
||||
$this->getPostAlterTableIndexForeignKeySQL($diff)
|
||||
);
|
||||
}
|
||||
|
||||
return array_merge($sql, $tableSql, $columnSql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gathers the table alteration SQL for a given column diff.
|
||||
*
|
||||
* @param Table $table The table to gather the SQL for.
|
||||
* @param ColumnDiff $columnDiff The column diff to evaluate.
|
||||
* @param array $sql The sequence of table alteration statements to fill.
|
||||
* @param array $queryParts The sequence of column alteration clauses to fill.
|
||||
*/
|
||||
private function gatherAlterColumnSQL(Table $table, ColumnDiff $columnDiff, array &$sql, array &$queryParts)
|
||||
{
|
||||
$alterColumnClauses = $this->getAlterColumnClausesSQL($columnDiff);
|
||||
|
||||
if (empty($alterColumnClauses)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If we have a single column alteration, we can append the clause to the main query.
|
||||
if (count($alterColumnClauses) === 1) {
|
||||
$queryParts[] = current($alterColumnClauses);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// We have multiple alterations for the same column,
|
||||
// so we need to trigger a complete ALTER TABLE statement
|
||||
// for each ALTER COLUMN clause.
|
||||
foreach ($alterColumnClauses as $alterColumnClause) {
|
||||
$sql[] = 'ALTER TABLE ' . $table->getQuotedName($this) . ' ' . $alterColumnClause;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ALTER COLUMN SQL clauses for altering a column described by the given column diff.
|
||||
*
|
||||
* @param ColumnDiff $columnDiff The column diff to evaluate.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function getAlterColumnClausesSQL(ColumnDiff $columnDiff)
|
||||
{
|
||||
$column = $columnDiff->column->toArray();
|
||||
|
||||
$alterClause = 'ALTER COLUMN ' . $columnDiff->column->getQuotedName($this);
|
||||
|
||||
if ($column['columnDefinition']) {
|
||||
return [$alterClause . ' ' . $column['columnDefinition']];
|
||||
}
|
||||
|
||||
$clauses = [];
|
||||
|
||||
if ($columnDiff->hasChanged('type') ||
|
||||
$columnDiff->hasChanged('length') ||
|
||||
$columnDiff->hasChanged('precision') ||
|
||||
$columnDiff->hasChanged('scale') ||
|
||||
$columnDiff->hasChanged('fixed')
|
||||
) {
|
||||
$clauses[] = $alterClause . ' SET DATA TYPE ' . $column['type']->getSQLDeclaration($column, $this);
|
||||
}
|
||||
|
||||
if ($columnDiff->hasChanged('notnull')) {
|
||||
$clauses[] = $column['notnull'] ? $alterClause . ' SET NOT NULL' : $alterClause . ' DROP NOT NULL';
|
||||
}
|
||||
|
||||
if ($columnDiff->hasChanged('default')) {
|
||||
if (isset($column['default'])) {
|
||||
$defaultClause = $this->getDefaultValueDeclarationSQL($column);
|
||||
|
||||
if ($defaultClause) {
|
||||
$clauses[] = $alterClause . ' SET' . $defaultClause;
|
||||
}
|
||||
} else {
|
||||
$clauses[] = $alterClause . ' DROP DEFAULT';
|
||||
}
|
||||
}
|
||||
|
||||
return $clauses;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff)
|
||||
{
|
||||
$sql = [];
|
||||
$table = $diff->getName($this)->getQuotedName($this);
|
||||
|
||||
foreach ($diff->removedIndexes as $remKey => $remIndex) {
|
||||
foreach ($diff->addedIndexes as $addKey => $addIndex) {
|
||||
if ($remIndex->getColumns() == $addIndex->getColumns()) {
|
||||
if ($remIndex->isPrimary()) {
|
||||
$sql[] = 'ALTER TABLE ' . $table . ' DROP PRIMARY KEY';
|
||||
} elseif ($remIndex->isUnique()) {
|
||||
$sql[] = 'ALTER TABLE ' . $table . ' DROP UNIQUE ' . $remIndex->getQuotedName($this);
|
||||
} else {
|
||||
$sql[] = $this->getDropIndexSQL($remIndex, $table);
|
||||
}
|
||||
|
||||
$sql[] = $this->getCreateIndexSQL($addIndex, $table);
|
||||
|
||||
unset($diff->removedIndexes[$remKey], $diff->addedIndexes[$addKey]);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sql = array_merge($sql, parent::getPreAlterTableIndexForeignKeySQL($diff));
|
||||
|
||||
return $sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName)
|
||||
{
|
||||
if (strpos($tableName, '.') !== false) {
|
||||
list($schema) = explode('.', $tableName);
|
||||
$oldIndexName = $schema . '.' . $oldIndexName;
|
||||
}
|
||||
|
||||
return ['RENAME INDEX ' . $oldIndexName . ' TO ' . $index->getQuotedName($this)];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDefaultValueDeclarationSQL($field)
|
||||
{
|
||||
if ( ! empty($field['autoincrement'])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (isset($field['version']) && $field['version']) {
|
||||
if ((string) $field['type'] != "DateTime") {
|
||||
$field['default'] = "1";
|
||||
}
|
||||
}
|
||||
|
||||
return parent::getDefaultValueDeclarationSQL($field);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getEmptyIdentityInsertSQL($tableName, $identifierColumnName)
|
||||
{
|
||||
return 'INSERT INTO ' . $tableName . ' (' . $identifierColumnName . ') VALUES (DEFAULT)';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getCreateTemporaryTableSnippetSQL()
|
||||
{
|
||||
return "DECLARE GLOBAL TEMPORARY TABLE";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getTemporaryTableName($tableName)
|
||||
{
|
||||
return "SESSION." . $tableName;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function doModifyLimitQuery($query, $limit, $offset = null)
|
||||
{
|
||||
$where = [];
|
||||
|
||||
if ($offset > 0) {
|
||||
$where[] = sprintf('db22.DC_ROWNUM >= %d', $offset + 1);
|
||||
}
|
||||
|
||||
if ($limit !== null) {
|
||||
$where[] = sprintf('db22.DC_ROWNUM <= %d', $offset + $limit);
|
||||
}
|
||||
|
||||
if (empty($where)) {
|
||||
return $query;
|
||||
}
|
||||
|
||||
// Todo OVER() needs ORDER BY data!
|
||||
return sprintf(
|
||||
'SELECT db22.* FROM (SELECT db21.*, ROW_NUMBER() OVER() AS DC_ROWNUM FROM (%s) db21) db22 WHERE %s',
|
||||
$query,
|
||||
implode(' AND ', $where)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getLocateExpression($str, $substr, $startPos = false)
|
||||
{
|
||||
if ($startPos == false) {
|
||||
return 'LOCATE(' . $substr . ', ' . $str . ')';
|
||||
}
|
||||
|
||||
return 'LOCATE(' . $substr . ', ' . $str . ', '.$startPos.')';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getSubstringExpression($value, $from, $length = null)
|
||||
{
|
||||
if ($length === null) {
|
||||
return 'SUBSTR(' . $value . ', ' . $from . ')';
|
||||
}
|
||||
|
||||
return 'SUBSTR(' . $value . ', ' . $from . ', ' . $length . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function supportsIdentityColumns()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function prefersIdentityColumns()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* DB2 returns all column names in SQL result sets in uppercase.
|
||||
*/
|
||||
public function getSQLResultCasing($column)
|
||||
{
|
||||
return strtoupper($column);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getForUpdateSQL()
|
||||
{
|
||||
return ' WITH RR USE AND KEEP UPDATE LOCKS';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDummySelectSQL()
|
||||
{
|
||||
$expression = func_num_args() > 0 ? func_get_arg(0) : '1';
|
||||
|
||||
return sprintf('SELECT %s FROM sysibm.sysdummy1', $expression);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* DB2 supports savepoints, but they work semantically different than on other vendor platforms.
|
||||
*
|
||||
* TODO: We have to investigate how to get DB2 up and running with savepoints.
|
||||
*/
|
||||
public function supportsSavepoints()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\DB2Keywords::class;
|
||||
}
|
||||
}
|
||||
28
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DateIntervalUnit.php
vendored
Normal file
28
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DateIntervalUnit.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
final class DateIntervalUnit
|
||||
{
|
||||
public const SECOND = 'SECOND';
|
||||
|
||||
public const MINUTE = 'MINUTE';
|
||||
|
||||
public const HOUR = 'HOUR';
|
||||
|
||||
public const DAY = 'DAY';
|
||||
|
||||
public const WEEK = 'WEEK';
|
||||
|
||||
public const MONTH = 'MONTH';
|
||||
|
||||
public const QUARTER = 'QUARTER';
|
||||
|
||||
public const YEAR = 'YEAR';
|
||||
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
}
|
||||
639
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php
vendored
Normal file
639
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php
vendored
Normal file
@@ -0,0 +1,639 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
use Doctrine\DBAL\Schema\Identifier;
|
||||
use Doctrine\DBAL\Schema\Index;
|
||||
use Doctrine\DBAL\Schema\Table;
|
||||
use Doctrine\DBAL\Schema\TableDiff;
|
||||
use Doctrine\DBAL\Types\BinaryType;
|
||||
use function array_merge;
|
||||
use function array_unique;
|
||||
use function array_values;
|
||||
use function count;
|
||||
use function func_get_args;
|
||||
use function implode;
|
||||
use function is_array;
|
||||
use function is_bool;
|
||||
use function is_numeric;
|
||||
use function is_string;
|
||||
use function join;
|
||||
use function sprintf;
|
||||
use function trim;
|
||||
|
||||
/**
|
||||
* Drizzle platform
|
||||
*
|
||||
* @author Kim Hemsø Rasmussen <kimhemsoe@gmail.com>
|
||||
*/
|
||||
class DrizzlePlatform extends AbstractPlatform
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'drizzle';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getIdentifierQuoteCharacter()
|
||||
{
|
||||
return '`';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getConcatExpression()
|
||||
{
|
||||
$args = func_get_args();
|
||||
|
||||
return 'CONCAT(' . join(', ', (array) $args) . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit)
|
||||
{
|
||||
$function = '+' === $operator ? 'DATE_ADD' : 'DATE_SUB';
|
||||
|
||||
return $function . '(' . $date . ', INTERVAL ' . $interval . ' ' . $unit . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDateDiffExpression($date1, $date2)
|
||||
{
|
||||
return 'DATEDIFF(' . $date1 . ', ' . $date2 . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getBooleanTypeDeclarationSQL(array $field)
|
||||
{
|
||||
return 'BOOLEAN';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getIntegerTypeDeclarationSQL(array $field)
|
||||
{
|
||||
return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($field);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef)
|
||||
{
|
||||
$autoinc = '';
|
||||
if ( ! empty($columnDef['autoincrement'])) {
|
||||
$autoinc = ' AUTO_INCREMENT';
|
||||
}
|
||||
|
||||
return $autoinc;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getBigIntTypeDeclarationSQL(array $field)
|
||||
{
|
||||
return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($field);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getSmallIntTypeDeclarationSQL(array $field)
|
||||
{
|
||||
return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($field);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed)
|
||||
{
|
||||
return $length ? 'VARCHAR(' . $length . ')' : 'VARCHAR(255)';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed)
|
||||
{
|
||||
return 'VARBINARY(' . ($length ?: 255) . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function initializeDoctrineTypeMappings()
|
||||
{
|
||||
$this->doctrineTypeMapping = [
|
||||
'boolean' => 'boolean',
|
||||
'varchar' => 'string',
|
||||
'varbinary' => 'binary',
|
||||
'integer' => 'integer',
|
||||
'blob' => 'blob',
|
||||
'decimal' => 'decimal',
|
||||
'datetime' => 'datetime',
|
||||
'date' => 'date',
|
||||
'time' => 'time',
|
||||
'text' => 'text',
|
||||
'timestamp' => 'datetime',
|
||||
'double' => 'float',
|
||||
'bigint' => 'bigint',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getClobTypeDeclarationSQL(array $field)
|
||||
{
|
||||
return 'TEXT';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getBlobTypeDeclarationSQL(array $field)
|
||||
{
|
||||
return 'BLOB';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getCreateDatabaseSQL($name)
|
||||
{
|
||||
return 'CREATE DATABASE ' . $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDropDatabaseSQL($name)
|
||||
{
|
||||
return 'DROP DATABASE ' . $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function _getCreateTableSQL($tableName, array $columns, array $options = [])
|
||||
{
|
||||
$queryFields = $this->getColumnDeclarationListSQL($columns);
|
||||
|
||||
if (isset($options['uniqueConstraints']) && ! empty($options['uniqueConstraints'])) {
|
||||
foreach ($options['uniqueConstraints'] as $index => $definition) {
|
||||
$queryFields .= ', ' . $this->getUniqueConstraintDeclarationSQL($index, $definition);
|
||||
}
|
||||
}
|
||||
|
||||
// add all indexes
|
||||
if (isset($options['indexes']) && ! empty($options['indexes'])) {
|
||||
foreach ($options['indexes'] as $index => $definition) {
|
||||
$queryFields .= ', ' . $this->getIndexDeclarationSQL($index, $definition);
|
||||
}
|
||||
}
|
||||
|
||||
// attach all primary keys
|
||||
if (isset($options['primary']) && ! empty($options['primary'])) {
|
||||
$keyColumns = array_unique(array_values($options['primary']));
|
||||
$queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')';
|
||||
}
|
||||
|
||||
$query = 'CREATE ';
|
||||
|
||||
if (!empty($options['temporary'])) {
|
||||
$query .= 'TEMPORARY ';
|
||||
}
|
||||
|
||||
$query .= 'TABLE ' . $tableName . ' (' . $queryFields . ') ';
|
||||
$query .= $this->buildTableOptions($options);
|
||||
$query .= $this->buildPartitionOptions($options);
|
||||
|
||||
$sql = [$query];
|
||||
|
||||
if (isset($options['foreignKeys'])) {
|
||||
foreach ((array) $options['foreignKeys'] as $definition) {
|
||||
$sql[] = $this->getCreateForeignKeySQL($definition, $tableName);
|
||||
}
|
||||
}
|
||||
|
||||
return $sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build SQL for table options
|
||||
*
|
||||
* @param array $options
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function buildTableOptions(array $options)
|
||||
{
|
||||
if (isset($options['table_options'])) {
|
||||
return $options['table_options'];
|
||||
}
|
||||
|
||||
$tableOptions = [];
|
||||
|
||||
// Collate
|
||||
if ( ! isset($options['collate'])) {
|
||||
$options['collate'] = 'utf8_unicode_ci';
|
||||
}
|
||||
|
||||
$tableOptions[] = sprintf('COLLATE %s', $options['collate']);
|
||||
|
||||
// Engine
|
||||
if ( ! isset($options['engine'])) {
|
||||
$options['engine'] = 'InnoDB';
|
||||
}
|
||||
|
||||
$tableOptions[] = sprintf('ENGINE = %s', $options['engine']);
|
||||
|
||||
// Auto increment
|
||||
if (isset($options['auto_increment'])) {
|
||||
$tableOptions[] = sprintf('AUTO_INCREMENT = %s', $options['auto_increment']);
|
||||
}
|
||||
|
||||
// Comment
|
||||
if (isset($options['comment'])) {
|
||||
$comment = trim($options['comment'], " '");
|
||||
|
||||
$tableOptions[] = sprintf("COMMENT = %s ", $this->quoteStringLiteral($comment));
|
||||
}
|
||||
|
||||
// Row format
|
||||
if (isset($options['row_format'])) {
|
||||
$tableOptions[] = sprintf('ROW_FORMAT = %s', $options['row_format']);
|
||||
}
|
||||
|
||||
return implode(' ', $tableOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build SQL for partition options.
|
||||
*
|
||||
* @param array $options
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function buildPartitionOptions(array $options)
|
||||
{
|
||||
return (isset($options['partition_options']))
|
||||
? ' ' . $options['partition_options']
|
||||
: '';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getListDatabasesSQL()
|
||||
{
|
||||
return "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE CATALOG_NAME='LOCAL'";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\DrizzleKeywords::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getListTablesSQL()
|
||||
{
|
||||
return "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE' AND TABLE_SCHEMA=DATABASE()";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getListTableColumnsSQL($table, $database = null)
|
||||
{
|
||||
if ($database) {
|
||||
$database = "'" . $database . "'";
|
||||
} else {
|
||||
$database = 'DATABASE()';
|
||||
}
|
||||
|
||||
return "SELECT COLUMN_NAME, DATA_TYPE, COLUMN_COMMENT, IS_NULLABLE, IS_AUTO_INCREMENT, CHARACTER_MAXIMUM_LENGTH, COLUMN_DEFAULT," .
|
||||
" NUMERIC_PRECISION, NUMERIC_SCALE, COLLATION_NAME" .
|
||||
" FROM DATA_DICTIONARY.COLUMNS" .
|
||||
" WHERE TABLE_SCHEMA=" . $database . " AND TABLE_NAME = '" . $table . "'";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getListTableForeignKeysSQL($table, $database = null)
|
||||
{
|
||||
if ($database) {
|
||||
$database = "'" . $database . "'";
|
||||
} else {
|
||||
$database = 'DATABASE()';
|
||||
}
|
||||
|
||||
return "SELECT CONSTRAINT_NAME, CONSTRAINT_COLUMNS, REFERENCED_TABLE_NAME, REFERENCED_TABLE_COLUMNS, UPDATE_RULE, DELETE_RULE" .
|
||||
" FROM DATA_DICTIONARY.FOREIGN_KEYS" .
|
||||
" WHERE CONSTRAINT_SCHEMA=" . $database . " AND CONSTRAINT_TABLE='" . $table . "'";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getListTableIndexesSQL($table, $database = null)
|
||||
{
|
||||
if ($database) {
|
||||
$database = "'" . $database . "'";
|
||||
} else {
|
||||
$database = 'DATABASE()';
|
||||
}
|
||||
|
||||
return "SELECT INDEX_NAME AS 'key_name', COLUMN_NAME AS 'column_name', IS_USED_IN_PRIMARY AS 'primary', IS_UNIQUE=0 AS 'non_unique'" .
|
||||
" FROM DATA_DICTIONARY.INDEX_PARTS" .
|
||||
" WHERE TABLE_SCHEMA=" . $database . " AND TABLE_NAME='" . $table . "'";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function prefersIdentityColumns()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function supportsIdentityColumns()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function supportsInlineColumnComments()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function supportsViews()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supportsColumnCollation()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDropIndexSQL($index, $table=null)
|
||||
{
|
||||
if ($index instanceof Index) {
|
||||
$indexName = $index->getQuotedName($this);
|
||||
} elseif (is_string($index)) {
|
||||
$indexName = $index;
|
||||
} else {
|
||||
throw new \InvalidArgumentException('DrizzlePlatform::getDropIndexSQL() expects $index parameter to be string or \Doctrine\DBAL\Schema\Index.');
|
||||
}
|
||||
|
||||
if ($table instanceof Table) {
|
||||
$table = $table->getQuotedName($this);
|
||||
} elseif (!is_string($table)) {
|
||||
throw new \InvalidArgumentException('DrizzlePlatform::getDropIndexSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.');
|
||||
}
|
||||
|
||||
if ($index instanceof Index && $index->isPrimary()) {
|
||||
// drizzle primary keys are always named "PRIMARY",
|
||||
// so we cannot use them in statements because of them being keyword.
|
||||
return $this->getDropPrimaryKeySQL($table);
|
||||
}
|
||||
|
||||
return 'DROP INDEX ' . $indexName . ' ON ' . $table;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getDropPrimaryKeySQL($table)
|
||||
{
|
||||
return 'ALTER TABLE ' . $table . ' DROP PRIMARY KEY';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration)
|
||||
{
|
||||
if (isset($fieldDeclaration['version']) && $fieldDeclaration['version'] == true) {
|
||||
return 'TIMESTAMP';
|
||||
}
|
||||
|
||||
return 'DATETIME';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
|
||||
{
|
||||
return 'TIME';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDateTypeDeclarationSQL(array $fieldDeclaration)
|
||||
{
|
||||
return 'DATE';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getAlterTableSQL(TableDiff $diff)
|
||||
{
|
||||
$columnSql = [];
|
||||
$queryParts = [];
|
||||
|
||||
if ($diff->newName !== false) {
|
||||
$queryParts[] = 'RENAME TO ' . $diff->getNewName()->getQuotedName($this);
|
||||
}
|
||||
|
||||
foreach ($diff->addedColumns as $column) {
|
||||
if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$columnArray = $column->toArray();
|
||||
$columnArray['comment'] = $this->getColumnComment($column);
|
||||
$queryParts[] = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray);
|
||||
}
|
||||
|
||||
foreach ($diff->removedColumns as $column) {
|
||||
if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$queryParts[] = 'DROP ' . $column->getQuotedName($this);
|
||||
}
|
||||
|
||||
foreach ($diff->changedColumns as $columnDiff) {
|
||||
if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* @var $columnDiff \Doctrine\DBAL\Schema\ColumnDiff */
|
||||
$column = $columnDiff->column;
|
||||
$columnArray = $column->toArray();
|
||||
|
||||
// Do not generate column alteration clause if type is binary and only fixed property has changed.
|
||||
// Drizzle only supports binary type columns with variable length.
|
||||
// Avoids unnecessary table alteration statements.
|
||||
if ($columnArray['type'] instanceof BinaryType &&
|
||||
$columnDiff->hasChanged('fixed') &&
|
||||
count($columnDiff->changedProperties) === 1
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$columnArray['comment'] = $this->getColumnComment($column);
|
||||
$queryParts[] = 'CHANGE ' . ($columnDiff->getOldColumnName()->getQuotedName($this)) . ' '
|
||||
. $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray);
|
||||
}
|
||||
|
||||
foreach ($diff->renamedColumns as $oldColumnName => $column) {
|
||||
if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$oldColumnName = new Identifier($oldColumnName);
|
||||
|
||||
$columnArray = $column->toArray();
|
||||
$columnArray['comment'] = $this->getColumnComment($column);
|
||||
$queryParts[] = 'CHANGE ' . $oldColumnName->getQuotedName($this) . ' '
|
||||
. $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray);
|
||||
}
|
||||
|
||||
$sql = [];
|
||||
$tableSql = [];
|
||||
|
||||
if ( ! $this->onSchemaAlterTable($diff, $tableSql)) {
|
||||
if (count($queryParts) > 0) {
|
||||
$sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . implode(", ", $queryParts);
|
||||
}
|
||||
$sql = array_merge(
|
||||
$this->getPreAlterTableIndexForeignKeySQL($diff),
|
||||
$sql,
|
||||
$this->getPostAlterTableIndexForeignKeySQL($diff)
|
||||
);
|
||||
}
|
||||
|
||||
return array_merge($sql, $tableSql, $columnSql);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDropTemporaryTableSQL($table)
|
||||
{
|
||||
if ($table instanceof Table) {
|
||||
$table = $table->getQuotedName($this);
|
||||
} elseif (!is_string($table)) {
|
||||
throw new \InvalidArgumentException('getDropTableSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.');
|
||||
}
|
||||
|
||||
return 'DROP TEMPORARY TABLE ' . $table;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function convertBooleans($item)
|
||||
{
|
||||
if (is_array($item)) {
|
||||
foreach ($item as $key => $value) {
|
||||
if (is_bool($value) || is_numeric($item)) {
|
||||
$item[$key] = ($value) ? 'true' : 'false';
|
||||
}
|
||||
}
|
||||
} elseif (is_bool($item) || is_numeric($item)) {
|
||||
$item = ($item) ? 'true' : 'false';
|
||||
}
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getLocateExpression($str, $substr, $startPos = false)
|
||||
{
|
||||
if ($startPos == false) {
|
||||
return 'LOCATE(' . $substr . ', ' . $str . ')';
|
||||
}
|
||||
|
||||
return 'LOCATE(' . $substr . ', ' . $str . ', '.$startPos.')';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @deprecated Use application-generated UUIDs instead
|
||||
*/
|
||||
public function getGuidExpression()
|
||||
{
|
||||
return 'UUID()';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getRegexpExpression()
|
||||
{
|
||||
return 'RLIKE';
|
||||
}
|
||||
}
|
||||
441
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/DB2Keywords.php
vendored
Normal file
441
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/DB2Keywords.php
vendored
Normal file
@@ -0,0 +1,441 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* DB2 Keywords.
|
||||
*
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.0
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
*/
|
||||
class DB2Keywords extends KeywordList
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'DB2';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return [
|
||||
'ACTIVATE',
|
||||
'ADD',
|
||||
'AFTER',
|
||||
'ALIAS',
|
||||
'ALL',
|
||||
'ALLOCATE',
|
||||
'DOCUMENT',
|
||||
'DOUBLE',
|
||||
'DROP',
|
||||
'DSSIZE',
|
||||
'DYNAMIC',
|
||||
'EACH',
|
||||
'LOCK',
|
||||
'LOCKMAX',
|
||||
'LOCKSIZE',
|
||||
'LONG',
|
||||
'LOOP',
|
||||
'MAINTAINED',
|
||||
'ROUND_CEILING',
|
||||
'ROUND_DOWN',
|
||||
'ROUND_FLOOR',
|
||||
'ROUND_HALF_DOWN',
|
||||
'ROUND_HALF_EVEN',
|
||||
'ROUND_HALF_UP',
|
||||
'ALLOW',
|
||||
'ALTER',
|
||||
'AND',
|
||||
'ANY',
|
||||
'AS',
|
||||
'ASENSITIVE',
|
||||
'ASSOCIATE',
|
||||
'ASUTIME',
|
||||
'AT',
|
||||
'ATTRIBUTES',
|
||||
'AUDIT',
|
||||
'AUTHORIZATION',
|
||||
'AUX',
|
||||
'AUXILIARY',
|
||||
'BEFORE',
|
||||
'BEGIN',
|
||||
'BETWEEN',
|
||||
'BINARY',
|
||||
'BUFFERPOOL',
|
||||
'BY',
|
||||
'CACHE',
|
||||
'CALL',
|
||||
'CALLED',
|
||||
'CAPTURE',
|
||||
'CARDINALITY',
|
||||
'CASCADED',
|
||||
'CASE',
|
||||
'CAST',
|
||||
'CCSID',
|
||||
'CHAR',
|
||||
'CHARACTER',
|
||||
'CHECK',
|
||||
'CLONE',
|
||||
'CLOSE',
|
||||
'CLUSTER',
|
||||
'COLLECTION',
|
||||
'COLLID',
|
||||
'COLUMN',
|
||||
'COMMENT',
|
||||
'COMMIT',
|
||||
'CONCAT',
|
||||
'CONDITION',
|
||||
'CONNECT',
|
||||
'CONNECTION',
|
||||
'CONSTRAINT',
|
||||
'CONTAINS',
|
||||
'CONTINUE',
|
||||
'COUNT',
|
||||
'COUNT_BIG',
|
||||
'CREATE',
|
||||
'CROSS',
|
||||
'CURRENT',
|
||||
'CURRENT_DATE',
|
||||
'CURRENT_LC_CTYPE',
|
||||
'CURRENT_PATH',
|
||||
'CURRENT_SCHEMA',
|
||||
'CURRENT_SERVER',
|
||||
'CURRENT_TIME',
|
||||
'CURRENT_TIMESTAMP',
|
||||
'CURRENT_TIMEZONE',
|
||||
'CURRENT_USER',
|
||||
'CURSOR',
|
||||
'CYCLE',
|
||||
'DATA',
|
||||
'DATABASE',
|
||||
'DATAPARTITIONNAME',
|
||||
'DATAPARTITIONNUM',
|
||||
'EDITPROC',
|
||||
'ELSE',
|
||||
'ELSEIF',
|
||||
'ENABLE',
|
||||
'ENCODING',
|
||||
'ENCRYPTION',
|
||||
'END',
|
||||
'END-EXEC',
|
||||
'ENDING',
|
||||
'ERASE',
|
||||
'ESCAPE',
|
||||
'EVERY',
|
||||
'EXCEPT',
|
||||
'EXCEPTION',
|
||||
'EXCLUDING',
|
||||
'EXCLUSIVE',
|
||||
'EXECUTE',
|
||||
'EXISTS',
|
||||
'EXIT',
|
||||
'EXPLAIN',
|
||||
'EXTERNAL',
|
||||
'EXTRACT',
|
||||
'FENCED',
|
||||
'FETCH',
|
||||
'FIELDPROC',
|
||||
'FILE',
|
||||
'FINAL',
|
||||
'FOR',
|
||||
'FOREIGN',
|
||||
'FREE',
|
||||
'FROM',
|
||||
'FULL',
|
||||
'FUNCTION',
|
||||
'GENERAL',
|
||||
'GENERATED',
|
||||
'GET',
|
||||
'GLOBAL',
|
||||
'GO',
|
||||
'GOTO',
|
||||
'GRANT',
|
||||
'GRAPHIC',
|
||||
'GROUP',
|
||||
'HANDLER',
|
||||
'HASH',
|
||||
'HASHED_VALUE',
|
||||
'HAVING',
|
||||
'HINT',
|
||||
'HOLD',
|
||||
'HOUR',
|
||||
'HOURS',
|
||||
'IDENTITY',
|
||||
'IF',
|
||||
'IMMEDIATE',
|
||||
'IN',
|
||||
'INCLUDING',
|
||||
'INCLUSIVE',
|
||||
'INCREMENT',
|
||||
'INDEX',
|
||||
'INDICATOR',
|
||||
'INF',
|
||||
'INFINITY',
|
||||
'INHERIT',
|
||||
'INNER',
|
||||
'INOUT',
|
||||
'INSENSITIVE',
|
||||
'INSERT',
|
||||
'INTEGRITY',
|
||||
'MATERIALIZED',
|
||||
'MAXVALUE',
|
||||
'MICROSECOND',
|
||||
'MICROSECONDS',
|
||||
'MINUTE',
|
||||
'MINUTES',
|
||||
'MINVALUE',
|
||||
'MODE',
|
||||
'MODIFIES',
|
||||
'MONTH',
|
||||
'MONTHS',
|
||||
'NAN',
|
||||
'NEW',
|
||||
'NEW_TABLE',
|
||||
'NEXTVAL',
|
||||
'NO',
|
||||
'NOCACHE',
|
||||
'NOCYCLE',
|
||||
'NODENAME',
|
||||
'NODENUMBER',
|
||||
'NOMAXVALUE',
|
||||
'NOMINVALUE',
|
||||
'NONE',
|
||||
'NOORDER',
|
||||
'NORMALIZED',
|
||||
'NOT',
|
||||
'NULL',
|
||||
'NULLS',
|
||||
'NUMPARTS',
|
||||
'OBID',
|
||||
'OF',
|
||||
'OLD',
|
||||
'OLD_TABLE',
|
||||
'ON',
|
||||
'OPEN',
|
||||
'OPTIMIZATION',
|
||||
'OPTIMIZE',
|
||||
'OPTION',
|
||||
'OR',
|
||||
'ORDER',
|
||||
'OUT',
|
||||
'OUTER',
|
||||
'OVER',
|
||||
'OVERRIDING',
|
||||
'PACKAGE',
|
||||
'PADDED',
|
||||
'PAGESIZE',
|
||||
'PARAMETER',
|
||||
'PART',
|
||||
'PARTITION',
|
||||
'PARTITIONED',
|
||||
'PARTITIONING',
|
||||
'PARTITIONS',
|
||||
'PASSWORD',
|
||||
'PATH',
|
||||
'PIECESIZE',
|
||||
'PLAN',
|
||||
'POSITION',
|
||||
'PRECISION',
|
||||
'PREPARE',
|
||||
'PREVVAL',
|
||||
'PRIMARY',
|
||||
'PRIQTY',
|
||||
'PRIVILEGES',
|
||||
'PROCEDURE',
|
||||
'PROGRAM',
|
||||
'PSID',
|
||||
'ROUND_UP',
|
||||
'ROUTINE',
|
||||
'ROW',
|
||||
'ROW_NUMBER',
|
||||
'ROWNUMBER',
|
||||
'ROWS',
|
||||
'ROWSET',
|
||||
'RRN',
|
||||
'RUN',
|
||||
'SAVEPOINT',
|
||||
'SCHEMA',
|
||||
'SCRATCHPAD',
|
||||
'SCROLL',
|
||||
'SEARCH',
|
||||
'SECOND',
|
||||
'SECONDS',
|
||||
'SECQTY',
|
||||
'SECURITY',
|
||||
'SELECT',
|
||||
'SENSITIVE',
|
||||
'SEQUENCE',
|
||||
'SESSION',
|
||||
'SESSION_USER',
|
||||
'SET',
|
||||
'SIGNAL',
|
||||
'SIMPLE',
|
||||
'SNAN',
|
||||
'SOME',
|
||||
'SOURCE',
|
||||
'SPECIFIC',
|
||||
'SQL',
|
||||
'SQLID',
|
||||
'STACKED',
|
||||
'STANDARD',
|
||||
'START',
|
||||
'STARTING',
|
||||
'STATEMENT',
|
||||
'STATIC',
|
||||
'STATMENT',
|
||||
'STAY',
|
||||
'STOGROUP',
|
||||
'STORES',
|
||||
'STYLE',
|
||||
'SUBSTRING',
|
||||
'SUMMARY',
|
||||
'SYNONYM',
|
||||
'SYSFUN',
|
||||
'SYSIBM',
|
||||
'SYSPROC',
|
||||
'SYSTEM',
|
||||
'SYSTEM_USER',
|
||||
'TABLE',
|
||||
'TABLESPACE',
|
||||
'THEN',
|
||||
'TIME',
|
||||
'TIMESTAMP',
|
||||
'TO',
|
||||
'TRANSACTION',
|
||||
'TRIGGER',
|
||||
'TRIM',
|
||||
'TRUNCATE',
|
||||
'TYPE',
|
||||
'UNDO',
|
||||
'UNION',
|
||||
'UNIQUE',
|
||||
'UNTIL',
|
||||
'UPDATE',
|
||||
'DATE',
|
||||
'DAY',
|
||||
'DAYS',
|
||||
'DB2GENERAL',
|
||||
'DB2GENRL',
|
||||
'DB2SQL',
|
||||
'DBINFO',
|
||||
'DBPARTITIONNAME',
|
||||
'DBPARTITIONNUM',
|
||||
'DEALLOCATE',
|
||||
'DECLARE',
|
||||
'DEFAULT',
|
||||
'DEFAULTS',
|
||||
'DEFINITION',
|
||||
'DELETE',
|
||||
'DENSE_RANK',
|
||||
'DENSERANK',
|
||||
'DESCRIBE',
|
||||
'DESCRIPTOR',
|
||||
'DETERMINISTIC',
|
||||
'DIAGNOSTICS',
|
||||
'DISABLE',
|
||||
'DISALLOW',
|
||||
'DISCONNECT',
|
||||
'DISTINCT',
|
||||
'DO',
|
||||
'INTERSECT',
|
||||
'PUBLIC',
|
||||
'USAGE',
|
||||
'INTO',
|
||||
'QUERY',
|
||||
'USER',
|
||||
'IS',
|
||||
'QUERYNO',
|
||||
'USING',
|
||||
'ISOBID',
|
||||
'RANGE',
|
||||
'VALIDPROC',
|
||||
'ISOLATION',
|
||||
'RANK',
|
||||
'VALUE',
|
||||
'ITERATE',
|
||||
'READ',
|
||||
'VALUES',
|
||||
'JAR',
|
||||
'READS',
|
||||
'VARIABLE',
|
||||
'JAVA',
|
||||
'RECOVERY',
|
||||
'VARIANT',
|
||||
'JOIN',
|
||||
'REFERENCES',
|
||||
'VCAT',
|
||||
'KEEP',
|
||||
'REFERENCING',
|
||||
'VERSION',
|
||||
'KEY',
|
||||
'REFRESH',
|
||||
'VIEW',
|
||||
'LABEL',
|
||||
'RELEASE',
|
||||
'VOLATILE',
|
||||
'LANGUAGE',
|
||||
'RENAME',
|
||||
'VOLUMES',
|
||||
'LATERAL',
|
||||
'REPEAT',
|
||||
'WHEN',
|
||||
'LC_CTYPE',
|
||||
'RESET',
|
||||
'WHENEVER',
|
||||
'LEAVE',
|
||||
'RESIGNAL',
|
||||
'WHERE',
|
||||
'LEFT',
|
||||
'RESTART',
|
||||
'WHILE',
|
||||
'LIKE',
|
||||
'RESTRICT',
|
||||
'WITH',
|
||||
'LINKTYPE',
|
||||
'RESULT',
|
||||
'WITHOUT',
|
||||
'LOCAL',
|
||||
'RESULT_SET_LOCATOR WLM',
|
||||
'LOCALDATE',
|
||||
'RETURN',
|
||||
'WRITE',
|
||||
'LOCALE',
|
||||
'RETURNS',
|
||||
'XMLELEMENT',
|
||||
'LOCALTIME',
|
||||
'REVOKE',
|
||||
'XMLEXISTS',
|
||||
'LOCALTIMESTAMP RIGHT',
|
||||
'XMLNAMESPACES',
|
||||
'LOCATOR',
|
||||
'ROLE',
|
||||
'YEAR',
|
||||
'LOCATORS',
|
||||
'ROLLBACK',
|
||||
'YEARS',
|
||||
];
|
||||
}
|
||||
}
|
||||
345
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/DrizzleKeywords.php
vendored
Normal file
345
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/DrizzleKeywords.php
vendored
Normal file
@@ -0,0 +1,345 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* Drizzle Keywordlist.
|
||||
*
|
||||
* @author Kim Hemsø Rasmussen <kimhemsoe@gmail.com>
|
||||
*/
|
||||
class DrizzleKeywords extends KeywordList
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'drizzle';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return [
|
||||
'ABS',
|
||||
'ALL',
|
||||
'ALLOCATE',
|
||||
'ALTER',
|
||||
'AND',
|
||||
'ANY',
|
||||
'ARE',
|
||||
'ARRAY',
|
||||
'AS',
|
||||
'ASENSITIVE',
|
||||
'ASYMMETRIC',
|
||||
'AT',
|
||||
'ATOMIC',
|
||||
'AUTHORIZATION',
|
||||
'AVG',
|
||||
'BEGIN',
|
||||
'BETWEEN',
|
||||
'BIGINT',
|
||||
'BINARY',
|
||||
'BLOB',
|
||||
'BOOLEAN',
|
||||
'BOTH',
|
||||
'BY',
|
||||
'CALL',
|
||||
'CALLED',
|
||||
'CARDINALITY',
|
||||
'CASCADED',
|
||||
'CASE',
|
||||
'CAST',
|
||||
'CEIL',
|
||||
'CEILING',
|
||||
'CHAR',
|
||||
'CHARACTER',
|
||||
'CHARACTER_LENGTH',
|
||||
'CHAR_LENGTH',
|
||||
'CHECK',
|
||||
'CLOB',
|
||||
'CLOSE',
|
||||
'COALESCE',
|
||||
'COLLATE',
|
||||
'COLLECT',
|
||||
'COLUMN',
|
||||
'COMMIT',
|
||||
'CONDITION',
|
||||
'CONNECT',
|
||||
'CONSTRAINT',
|
||||
'CONVERT',
|
||||
'CORR',
|
||||
'CORRESPONDING',
|
||||
'COUNT',
|
||||
'COVAR_POP',
|
||||
'COVAR_SAMP',
|
||||
'CREATE',
|
||||
'CROSS',
|
||||
'CUBE',
|
||||
'CUME_DIST',
|
||||
'CURRENT',
|
||||
'CURRENT_DATE',
|
||||
'CURRENT_DEFAULT_TRANSFORM_GROUP',
|
||||
'CURRENT_PATH',
|
||||
'CURRENT_ROLE',
|
||||
'CURRENT_TIME',
|
||||
'CURRENT_TIMESTAMP',
|
||||
'CURRENT_TRANSFORM_GROUP_FOR_TYPE',
|
||||
'CURRENT_USER',
|
||||
'CURSOR',
|
||||
'CYCLE',
|
||||
'DATE',
|
||||
'DAY',
|
||||
'DEALLOCATE',
|
||||
'DEC',
|
||||
'DECIMAL',
|
||||
'DECLARE',
|
||||
'DEFAULT',
|
||||
'DELETE',
|
||||
'DENSE_RANK',
|
||||
'DEREF',
|
||||
'DESCRIBE',
|
||||
'DETERMINISTIC',
|
||||
'DISCONNECT',
|
||||
'DISTINCT',
|
||||
'DOUBLE',
|
||||
'DROP',
|
||||
'DYNAMIC',
|
||||
'EACH',
|
||||
'ELEMENT',
|
||||
'ELSE',
|
||||
'END',
|
||||
'ESCAPE',
|
||||
'EVERY',
|
||||
'EXCEPT',
|
||||
'EXEC',
|
||||
'EXECUTE',
|
||||
'EXISTS',
|
||||
'EXP',
|
||||
'EXTERNAL',
|
||||
'EXTRACT',
|
||||
'FALSE',
|
||||
'FETCH',
|
||||
'FILTER',
|
||||
'FLOAT',
|
||||
'FLOOR',
|
||||
'FOR',
|
||||
'FOREIGN',
|
||||
'FREE',
|
||||
'FROM',
|
||||
'FULL',
|
||||
'FUNCTION',
|
||||
'FUSION',
|
||||
'GET',
|
||||
'GLOBAL',
|
||||
'GRANT',
|
||||
'GROUP',
|
||||
'GROUPING',
|
||||
'HAVING',
|
||||
'HOLD',
|
||||
'HOUR',
|
||||
'IDENTITY',
|
||||
'IN',
|
||||
'INDICATOR',
|
||||
'INNER',
|
||||
'INOUT',
|
||||
'INSENSITIVE',
|
||||
'INSERT',
|
||||
'INT',
|
||||
'INTEGER',
|
||||
'INTERSECT',
|
||||
'INTERSECTION',
|
||||
'INTERVAL',
|
||||
'INTO',
|
||||
'IS',
|
||||
'JOIN',
|
||||
'LANGUAGE',
|
||||
'LARGE',
|
||||
'LATERAL',
|
||||
'LEADING',
|
||||
'LEFT',
|
||||
'LIKE',
|
||||
'LN',
|
||||
'LOCAL',
|
||||
'LOCALTIME',
|
||||
'LOCALTIMESTAMP',
|
||||
'LOWER',
|
||||
'MATCH',
|
||||
'MAX',
|
||||
'MEMBER',
|
||||
'MERGE',
|
||||
'METHOD',
|
||||
'MIN',
|
||||
'MINUTE',
|
||||
'MOD',
|
||||
'MODIFIES',
|
||||
'MODULE',
|
||||
'MONTH',
|
||||
'MULTISET',
|
||||
'NATIONAL',
|
||||
'NATURAL',
|
||||
'NCHAR',
|
||||
'NCLOB',
|
||||
'NEW',
|
||||
'NO',
|
||||
'NONE',
|
||||
'NORMALIZE',
|
||||
'NOT',
|
||||
'NULL_SYM',
|
||||
'NULLIF',
|
||||
'NUMERIC',
|
||||
'OCTET_LENGTH',
|
||||
'OF',
|
||||
'OLD',
|
||||
'ON',
|
||||
'ONLY',
|
||||
'OPEN',
|
||||
'OR',
|
||||
'ORDER',
|
||||
'OUT',
|
||||
'OUTER',
|
||||
'OVER',
|
||||
'OVERLAPS',
|
||||
'OVERLAY',
|
||||
'PARAMETER',
|
||||
'PARTITION',
|
||||
'PERCENTILE_CONT',
|
||||
'PERCENTILE_DISC',
|
||||
'PERCENT_RANK',
|
||||
'POSITION',
|
||||
'POWER',
|
||||
'PRECISION',
|
||||
'PREPARE',
|
||||
'PRIMARY',
|
||||
'PROCEDURE',
|
||||
'RANGE',
|
||||
'RANK',
|
||||
'READS',
|
||||
'REAL',
|
||||
'RECURSIVE',
|
||||
'REF',
|
||||
'REFERENCES',
|
||||
'REFERENCING',
|
||||
'REGR_AVGX',
|
||||
'REGR_AVGY',
|
||||
'REGR_COUNT',
|
||||
'REGR_INTERCEPT',
|
||||
'REGR_R2',
|
||||
'REGR_SLOPE',
|
||||
'REGR_SXX',
|
||||
'REGR_SXY',
|
||||
'REGR_SYY',
|
||||
'RELEASE',
|
||||
'RESULT',
|
||||
'RETURN',
|
||||
'RETURNS',
|
||||
'REVOKE',
|
||||
'RIGHT',
|
||||
'ROLLBACK',
|
||||
'ROLLUP',
|
||||
'ROW',
|
||||
'ROWS',
|
||||
'ROW_NUMBER',
|
||||
'SAVEPOINT',
|
||||
'SCOPE',
|
||||
'SCROLL',
|
||||
'SEARCH',
|
||||
'SECOND',
|
||||
'SELECT',
|
||||
'SENSITIVE',
|
||||
'SESSION_USER',
|
||||
'SET',
|
||||
'SIMILAR',
|
||||
'SMALLINT',
|
||||
'SOME',
|
||||
'SPECIFIC',
|
||||
'SPECIFICTYPE',
|
||||
'SQL',
|
||||
'SQLEXCEPTION',
|
||||
'SQLSTATE',
|
||||
'SQLWARNING',
|
||||
'SQRT',
|
||||
'START',
|
||||
'STATIC',
|
||||
'STDDEV_POP',
|
||||
'STDDEV_SAMP',
|
||||
'SUBMULTISET',
|
||||
'SUBSTRING',
|
||||
'SUM',
|
||||
'SYMMETRIC',
|
||||
'SYSTEM',
|
||||
'SYSTEM_USER',
|
||||
'TABLE',
|
||||
'TABLESAMPLE',
|
||||
'THEN',
|
||||
'TIME',
|
||||
'TIMESTAMP',
|
||||
'TIMEZONE_HOUR',
|
||||
'TIMEZONE_MINUTE',
|
||||
'TO',
|
||||
'TRAILING',
|
||||
'TRANSLATE',
|
||||
'TRANSLATION',
|
||||
'TREAT',
|
||||
'TRIGGER',
|
||||
'TRIM',
|
||||
'TRUE',
|
||||
'UESCAPE',
|
||||
'UNION',
|
||||
'UNIQUE',
|
||||
'UNKNOWN',
|
||||
'UNNEST',
|
||||
'UPDATE',
|
||||
'UPPER',
|
||||
'USER',
|
||||
'USING',
|
||||
'VALUE',
|
||||
'VALUES',
|
||||
'VARCHAR',
|
||||
'VARYING',
|
||||
'VAR_POP',
|
||||
'VAR_SAMP',
|
||||
'WHEN',
|
||||
'WHENEVER',
|
||||
'WHERE',
|
||||
'WIDTH_BUCKET',
|
||||
'WINDOW',
|
||||
'WITH',
|
||||
'WITHIN',
|
||||
'WITHOUT',
|
||||
'XML',
|
||||
'XMLAGG',
|
||||
'XMLATTRIBUTES',
|
||||
'XMLBINARY',
|
||||
'XMLCOMMENT',
|
||||
'XMLCONCAT',
|
||||
'XMLELEMENT',
|
||||
'XMLFOREST',
|
||||
'XMLNAMESPACES',
|
||||
'XMLPARSE',
|
||||
'XMLPI',
|
||||
'XMLROOT',
|
||||
'XMLSERIALIZE',
|
||||
'YEAR',
|
||||
];
|
||||
}
|
||||
}
|
||||
77
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php
vendored
Normal file
77
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
use function array_flip;
|
||||
use function array_map;
|
||||
use function strtoupper;
|
||||
|
||||
/**
|
||||
* Abstract interface for a SQL reserved keyword dictionary.
|
||||
*
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.0
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
*/
|
||||
abstract class KeywordList
|
||||
{
|
||||
/**
|
||||
* @var array|null
|
||||
*/
|
||||
private $keywords = null;
|
||||
|
||||
/**
|
||||
* Checks if the given word is a keyword of this dialect/vendor platform.
|
||||
*
|
||||
* @param string $word
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isKeyword($word)
|
||||
{
|
||||
if ($this->keywords === null) {
|
||||
$this->initializeKeywords();
|
||||
}
|
||||
|
||||
return isset($this->keywords[strtoupper($word)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
protected function initializeKeywords()
|
||||
{
|
||||
$this->keywords = array_flip(array_map('strtoupper', $this->getKeywords()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of keywords.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
abstract protected function getKeywords();
|
||||
|
||||
/**
|
||||
* Returns the name of this keyword list.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getName();
|
||||
}
|
||||
290
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MariaDb102Keywords.php
vendored
Normal file
290
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MariaDb102Keywords.php
vendored
Normal file
@@ -0,0 +1,290 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* MariaDb reserved keywords list.
|
||||
* @link https://mariadb.com/kb/en/the-mariadb-library/reserved-words/
|
||||
*/
|
||||
final class MariaDb102Keywords extends MySQLKeywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName() : string
|
||||
{
|
||||
return 'MariaDb102';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getKeywords() : array
|
||||
{
|
||||
return [
|
||||
'ACCESSIBLE',
|
||||
'ADD',
|
||||
'ALL',
|
||||
'ALTER',
|
||||
'ANALYZE',
|
||||
'AND',
|
||||
'AS',
|
||||
'ASC',
|
||||
'ASENSITIVE',
|
||||
'BEFORE',
|
||||
'BETWEEN',
|
||||
'BIGINT',
|
||||
'BINARY',
|
||||
'BLOB',
|
||||
'BOTH',
|
||||
'BY',
|
||||
'CALL',
|
||||
'CASCADE',
|
||||
'CASE',
|
||||
'CHANGE',
|
||||
'CHAR',
|
||||
'CHARACTER',
|
||||
'CHECK',
|
||||
'COLLATE',
|
||||
'COLUMN',
|
||||
'CONDITION',
|
||||
'CONSTRAINT',
|
||||
'CONTINUE',
|
||||
'CONVERT',
|
||||
'CREATE',
|
||||
'CROSS',
|
||||
'CURRENT_DATE',
|
||||
'CURRENT_TIME',
|
||||
'CURRENT_TIMESTAMP',
|
||||
'CURRENT_USER',
|
||||
'CURSOR',
|
||||
'DATABASE',
|
||||
'DATABASES',
|
||||
'DAY_HOUR',
|
||||
'DAY_MICROSECOND',
|
||||
'DAY_MINUTE',
|
||||
'DAY_SECOND',
|
||||
'DEC',
|
||||
'DECIMAL',
|
||||
'DECLARE',
|
||||
'DEFAULT',
|
||||
'DELAYED',
|
||||
'DELETE',
|
||||
'DESC',
|
||||
'DESCRIBE',
|
||||
'DETERMINISTIC',
|
||||
'DISTINCT',
|
||||
'DISTINCTROW',
|
||||
'DIV',
|
||||
'DOUBLE',
|
||||
'DROP',
|
||||
'DUAL',
|
||||
'EACH',
|
||||
'ELSE',
|
||||
'ELSEIF',
|
||||
'ENCLOSED',
|
||||
'ESCAPED',
|
||||
'EXCEPT',
|
||||
'EXISTS',
|
||||
'EXIT',
|
||||
'EXPLAIN',
|
||||
'FALSE',
|
||||
'FETCH',
|
||||
'FLOAT',
|
||||
'FLOAT4',
|
||||
'FLOAT8',
|
||||
'FOR',
|
||||
'FORCE',
|
||||
'FOREIGN',
|
||||
'FROM',
|
||||
'FULLTEXT',
|
||||
'GENERATED',
|
||||
'GET',
|
||||
'GENERAL',
|
||||
'GRANT',
|
||||
'GROUP',
|
||||
'HAVING',
|
||||
'HIGH_PRIORITY',
|
||||
'HOUR_MICROSECOND',
|
||||
'HOUR_MINUTE',
|
||||
'HOUR_SECOND',
|
||||
'IF',
|
||||
'IGNORE',
|
||||
'IGNORE_SERVER_IDS',
|
||||
'IN',
|
||||
'INDEX',
|
||||
'INFILE',
|
||||
'INNER',
|
||||
'INOUT',
|
||||
'INSENSITIVE',
|
||||
'INSERT',
|
||||
'INT',
|
||||
'INT1',
|
||||
'INT2',
|
||||
'INT3',
|
||||
'INT4',
|
||||
'INT8',
|
||||
'INTEGER',
|
||||
'INTERSECT',
|
||||
'INTERVAL',
|
||||
'INTO',
|
||||
'IO_AFTER_GTIDS',
|
||||
'IO_BEFORE_GTIDS',
|
||||
'IS',
|
||||
'ITERATE',
|
||||
'JOIN',
|
||||
'KEY',
|
||||
'KEYS',
|
||||
'KILL',
|
||||
'LEADING',
|
||||
'LEAVE',
|
||||
'LEFT',
|
||||
'LIKE',
|
||||
'LIMIT',
|
||||
'LINEAR',
|
||||
'LINES',
|
||||
'LOAD',
|
||||
'LOCALTIME',
|
||||
'LOCALTIMESTAMP',
|
||||
'LOCK',
|
||||
'LONG',
|
||||
'LONGBLOB',
|
||||
'LONGTEXT',
|
||||
'LOOP',
|
||||
'LOW_PRIORITY',
|
||||
'MASTER_BIND',
|
||||
'MASTER_HEARTBEAT_PERIOD',
|
||||
'MASTER_SSL_VERIFY_SERVER_CERT',
|
||||
'MATCH',
|
||||
'MAXVALUE',
|
||||
'MEDIUMBLOB',
|
||||
'MEDIUMINT',
|
||||
'MEDIUMTEXT',
|
||||
'MIDDLEINT',
|
||||
'MINUTE_MICROSECOND',
|
||||
'MINUTE_SECOND',
|
||||
'MOD',
|
||||
'MODIFIES',
|
||||
'NATURAL',
|
||||
'NO_WRITE_TO_BINLOG',
|
||||
'NOT',
|
||||
'NULL',
|
||||
'NUMERIC',
|
||||
'ON',
|
||||
'OPTIMIZE',
|
||||
'OPTIMIZER_COSTS',
|
||||
'OPTION',
|
||||
'OPTIONALLY',
|
||||
'OR',
|
||||
'ORDER',
|
||||
'OUT',
|
||||
'OUTER',
|
||||
'OUTFILE',
|
||||
'OVER',
|
||||
'PARTITION',
|
||||
'PRECISION',
|
||||
'PRIMARY',
|
||||
'PROCEDURE',
|
||||
'PURGE',
|
||||
'RANGE',
|
||||
'READ',
|
||||
'READ_WRITE',
|
||||
'READS',
|
||||
'REAL',
|
||||
'RECURSIVE',
|
||||
'REFERENCES',
|
||||
'REGEXP',
|
||||
'RELEASE',
|
||||
'RENAME',
|
||||
'REPEAT',
|
||||
'REPLACE',
|
||||
'REQUIRE',
|
||||
'RESIGNAL',
|
||||
'RESTRICT',
|
||||
'RETURN',
|
||||
'RETURNING',
|
||||
'REVOKE',
|
||||
'RIGHT',
|
||||
'RLIKE',
|
||||
'ROWS',
|
||||
'SCHEMA',
|
||||
'SCHEMAS',
|
||||
'SECOND_MICROSECOND',
|
||||
'SELECT',
|
||||
'SENSITIVE',
|
||||
'SEPARATOR',
|
||||
'SET',
|
||||
'SHOW',
|
||||
'SIGNAL',
|
||||
'SLOW',
|
||||
'SMALLINT',
|
||||
'SPATIAL',
|
||||
'SPECIFIC',
|
||||
'SQL',
|
||||
'SQL_BIG_RESULT',
|
||||
'SQL_CALC_FOUND_ROWS',
|
||||
'SQL_SMALL_RESULT',
|
||||
'SQLEXCEPTION',
|
||||
'SQLSTATE',
|
||||
'SQLWARNING',
|
||||
'SSL',
|
||||
'STARTING',
|
||||
'STORED',
|
||||
'STRAIGHT_JOIN',
|
||||
'TABLE',
|
||||
'TERMINATED',
|
||||
'THEN',
|
||||
'TINYBLOB',
|
||||
'TINYINT',
|
||||
'TINYTEXT',
|
||||
'TO',
|
||||
'TRAILING',
|
||||
'TRIGGER',
|
||||
'TRUE',
|
||||
'UNDO',
|
||||
'UNION',
|
||||
'UNIQUE',
|
||||
'UNLOCK',
|
||||
'UNSIGNED',
|
||||
'UPDATE',
|
||||
'USAGE',
|
||||
'USE',
|
||||
'USING',
|
||||
'UTC_DATE',
|
||||
'UTC_TIME',
|
||||
'UTC_TIMESTAMP',
|
||||
'VALUES',
|
||||
'VARBINARY',
|
||||
'VARCHAR',
|
||||
'VARCHARACTER',
|
||||
'VARYING',
|
||||
'VIRTUAL',
|
||||
'WHEN',
|
||||
'WHERE',
|
||||
'WHILE',
|
||||
'WINDOW',
|
||||
'WITH',
|
||||
'WRITE',
|
||||
'XOR',
|
||||
'YEAR_MONTH',
|
||||
'ZEROFILL',
|
||||
];
|
||||
}
|
||||
}
|
||||
43
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MsSQLKeywords.php
vendored
Normal file
43
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MsSQLKeywords.php
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* MsSQL Keywordlist
|
||||
*
|
||||
* @license BSD http://www.opensource.org/licenses/bsd-license.php
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.0
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
* @author David Coallier <davidc@php.net>
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
* @deprecated Use SQLServerKeywords class instead.
|
||||
*/
|
||||
class MsSQLKeywords extends SQLServerKeywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'MsSQL';
|
||||
}
|
||||
}
|
||||
284
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQL57Keywords.php
vendored
Normal file
284
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQL57Keywords.php
vendored
Normal file
@@ -0,0 +1,284 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* MySQL 5.7 reserved keywords list.
|
||||
*
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.5
|
||||
*/
|
||||
class MySQL57Keywords extends MySQLKeywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'MySQL57';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords-5-7.html
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return [
|
||||
'ACCESSIBLE',
|
||||
'ADD',
|
||||
'ALL',
|
||||
'ALTER',
|
||||
'ANALYZE',
|
||||
'AND',
|
||||
'AS',
|
||||
'ASC',
|
||||
'ASENSITIVE',
|
||||
'BEFORE',
|
||||
'BETWEEN',
|
||||
'BIGINT',
|
||||
'BINARY',
|
||||
'BLOB',
|
||||
'BOTH',
|
||||
'BY',
|
||||
'CALL',
|
||||
'CASCADE',
|
||||
'CASE',
|
||||
'CHANGE',
|
||||
'CHAR',
|
||||
'CHARACTER',
|
||||
'CHECK',
|
||||
'COLLATE',
|
||||
'COLUMN',
|
||||
'CONDITION',
|
||||
'CONSTRAINT',
|
||||
'CONTINUE',
|
||||
'CONVERT',
|
||||
'CREATE',
|
||||
'CROSS',
|
||||
'CURRENT_DATE',
|
||||
'CURRENT_TIME',
|
||||
'CURRENT_TIMESTAMP',
|
||||
'CURRENT_USER',
|
||||
'CURSOR',
|
||||
'DATABASE',
|
||||
'DATABASES',
|
||||
'DAY_HOUR',
|
||||
'DAY_MICROSECOND',
|
||||
'DAY_MINUTE',
|
||||
'DAY_SECOND',
|
||||
'DEC',
|
||||
'DECIMAL',
|
||||
'DECLARE',
|
||||
'DEFAULT',
|
||||
'DELAYED',
|
||||
'DELETE',
|
||||
'DESC',
|
||||
'DESCRIBE',
|
||||
'DETERMINISTIC',
|
||||
'DISTINCT',
|
||||
'DISTINCTROW',
|
||||
'DIV',
|
||||
'DOUBLE',
|
||||
'DROP',
|
||||
'DUAL',
|
||||
'EACH',
|
||||
'ELSE',
|
||||
'ELSEIF',
|
||||
'ENCLOSED',
|
||||
'ESCAPED',
|
||||
'EXISTS',
|
||||
'EXIT',
|
||||
'EXPLAIN',
|
||||
'FALSE',
|
||||
'FETCH',
|
||||
'FLOAT',
|
||||
'FLOAT4',
|
||||
'FLOAT8',
|
||||
'FOR',
|
||||
'FORCE',
|
||||
'FOREIGN',
|
||||
'FROM',
|
||||
'FULLTEXT',
|
||||
'GENERATED',
|
||||
'GET',
|
||||
'GRANT',
|
||||
'GROUP',
|
||||
'HAVING',
|
||||
'HIGH_PRIORITY',
|
||||
'HOUR_MICROSECOND',
|
||||
'HOUR_MINUTE',
|
||||
'HOUR_SECOND',
|
||||
'IF',
|
||||
'IGNORE',
|
||||
'IN',
|
||||
'INDEX',
|
||||
'INFILE',
|
||||
'INNER',
|
||||
'INOUT',
|
||||
'INSENSITIVE',
|
||||
'INSERT',
|
||||
'INT',
|
||||
'INT1',
|
||||
'INT2',
|
||||
'INT3',
|
||||
'INT4',
|
||||
'INT8',
|
||||
'INTEGER',
|
||||
'INTERVAL',
|
||||
'INTO',
|
||||
'IO_AFTER_GTIDS',
|
||||
'IO_BEFORE_GTIDS',
|
||||
'IS',
|
||||
'ITERATE',
|
||||
'JOIN',
|
||||
'KEY',
|
||||
'KEYS',
|
||||
'KILL',
|
||||
'LEADING',
|
||||
'LEAVE',
|
||||
'LEFT',
|
||||
'LIKE',
|
||||
'LIMIT',
|
||||
'LINEAR',
|
||||
'LINES',
|
||||
'LOAD',
|
||||
'LOCALTIME',
|
||||
'LOCALTIMESTAMP',
|
||||
'LOCK',
|
||||
'LONG',
|
||||
'LONGBLOB',
|
||||
'LONGTEXT',
|
||||
'LOOP',
|
||||
'LOW_PRIORITY',
|
||||
'MASTER_BIND',
|
||||
'MASTER_SSL_VERIFY_SERVER_CERT',
|
||||
'MATCH',
|
||||
'MAXVALUE',
|
||||
'MEDIUMBLOB',
|
||||
'MEDIUMINT',
|
||||
'MEDIUMTEXT',
|
||||
'MIDDLEINT',
|
||||
'MINUTE_MICROSECOND',
|
||||
'MINUTE_SECOND',
|
||||
'MOD',
|
||||
'MODIFIES',
|
||||
'NATURAL',
|
||||
'NO_WRITE_TO_BINLOG',
|
||||
'NOT',
|
||||
'NULL',
|
||||
'NUMERIC',
|
||||
'ON',
|
||||
'OPTIMIZE',
|
||||
'OPTIMIZER_COSTS',
|
||||
'OPTION',
|
||||
'OPTIONALLY',
|
||||
'OR',
|
||||
'ORDER',
|
||||
'OUT',
|
||||
'OUTER',
|
||||
'OUTFILE',
|
||||
'PARTITION',
|
||||
'PRECISION',
|
||||
'PRIMARY',
|
||||
'PROCEDURE',
|
||||
'PURGE',
|
||||
'RANGE',
|
||||
'READ',
|
||||
'READ_WRITE',
|
||||
'READS',
|
||||
'REAL',
|
||||
'REFERENCES',
|
||||
'REGEXP',
|
||||
'RELEASE',
|
||||
'RENAME',
|
||||
'REPEAT',
|
||||
'REPLACE',
|
||||
'REQUIRE',
|
||||
'RESIGNAL',
|
||||
'RESTRICT',
|
||||
'RETURN',
|
||||
'REVOKE',
|
||||
'RIGHT',
|
||||
'RLIKE',
|
||||
'SCHEMA',
|
||||
'SCHEMAS',
|
||||
'SECOND_MICROSECOND',
|
||||
'SELECT',
|
||||
'SENSITIVE',
|
||||
'SEPARATOR',
|
||||
'SET',
|
||||
'SHOW',
|
||||
'SIGNAL',
|
||||
'SMALLINT',
|
||||
'SPATIAL',
|
||||
'SPECIFIC',
|
||||
'SQL',
|
||||
'SQL_BIG_RESULT',
|
||||
'SQL_CALC_FOUND_ROWS',
|
||||
'SQL_SMALL_RESULT',
|
||||
'SQLEXCEPTION',
|
||||
'SQLSTATE',
|
||||
'SQLWARNING',
|
||||
'SSL',
|
||||
'STARTING',
|
||||
'STORED',
|
||||
'STRAIGHT_JOIN',
|
||||
'TABLE',
|
||||
'TERMINATED',
|
||||
'THEN',
|
||||
'TINYBLOB',
|
||||
'TINYINT',
|
||||
'TINYTEXT',
|
||||
'TO',
|
||||
'TRAILING',
|
||||
'TRIGGER',
|
||||
'TRUE',
|
||||
'UNDO',
|
||||
'UNION',
|
||||
'UNIQUE',
|
||||
'UNLOCK',
|
||||
'UNSIGNED',
|
||||
'UPDATE',
|
||||
'USAGE',
|
||||
'USE',
|
||||
'USING',
|
||||
'UTC_DATE',
|
||||
'UTC_TIME',
|
||||
'UTC_TIMESTAMP',
|
||||
'VALUES',
|
||||
'VARBINARY',
|
||||
'VARCHAR',
|
||||
'VARCHARACTER',
|
||||
'VARYING',
|
||||
'VIRTUAL',
|
||||
'WHEN',
|
||||
'WHERE',
|
||||
'WHILE',
|
||||
'WITH',
|
||||
'WRITE',
|
||||
'XOR',
|
||||
'YEAR_MONTH',
|
||||
'ZEROFILL',
|
||||
];
|
||||
}
|
||||
}
|
||||
81
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQL80Keywords.php
vendored
Normal file
81
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQL80Keywords.php
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
use function array_merge;
|
||||
|
||||
/**
|
||||
* MySQL 8.0 reserved keywords list.
|
||||
*
|
||||
* @link www.doctrine-project.org
|
||||
*/
|
||||
class MySQL80Keywords extends MySQL57Keywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'MySQL80';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link https://dev.mysql.com/doc/refman/8.0/en/keywords.html
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
$keywords = parent::getKeywords();
|
||||
|
||||
$keywords = array_merge($keywords, [
|
||||
'ADMIN',
|
||||
'CUBE',
|
||||
'CUME_DIST',
|
||||
'DENSE_RANK',
|
||||
'EMPTY',
|
||||
'EXCEPT',
|
||||
'FIRST_VALUE',
|
||||
'FUNCTION',
|
||||
'GROUPING',
|
||||
'GROUPS',
|
||||
'JSON_TABLE',
|
||||
'LAG',
|
||||
'LAST_VALUE',
|
||||
'LEAD',
|
||||
'NTH_VALUE',
|
||||
'NTILE',
|
||||
'OF',
|
||||
'OVER',
|
||||
'PERCENT_RANK',
|
||||
'PERSIST',
|
||||
'PERSIST_ONLY',
|
||||
'RANK',
|
||||
'RECURSIVE',
|
||||
'ROW',
|
||||
'ROWS',
|
||||
'ROW_NUMBER',
|
||||
'SYSTEM',
|
||||
'WINDOW',
|
||||
]);
|
||||
|
||||
return $keywords;
|
||||
}
|
||||
}
|
||||
287
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQLKeywords.php
vendored
Normal file
287
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQLKeywords.php
vendored
Normal file
@@ -0,0 +1,287 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* MySQL Keywordlist.
|
||||
*
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.0
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
* @author David Coallier <davidc@php.net>
|
||||
*/
|
||||
class MySQLKeywords extends KeywordList
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'MySQL';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return [
|
||||
'ACCESSIBLE',
|
||||
'ADD',
|
||||
'ALL',
|
||||
'ALTER',
|
||||
'ANALYZE',
|
||||
'AND',
|
||||
'AS',
|
||||
'ASC',
|
||||
'ASENSITIVE',
|
||||
'BEFORE',
|
||||
'BETWEEN',
|
||||
'BIGINT',
|
||||
'BINARY',
|
||||
'BLOB',
|
||||
'BOTH',
|
||||
'BY',
|
||||
'CALL',
|
||||
'CASCADE',
|
||||
'CASE',
|
||||
'CHANGE',
|
||||
'CHAR',
|
||||
'CHARACTER',
|
||||
'CHECK',
|
||||
'COLLATE',
|
||||
'COLUMN',
|
||||
'CONDITION',
|
||||
'CONNECTION',
|
||||
'CONSTRAINT',
|
||||
'CONTINUE',
|
||||
'CONVERT',
|
||||
'CREATE',
|
||||
'CROSS',
|
||||
'CURRENT_DATE',
|
||||
'CURRENT_TIME',
|
||||
'CURRENT_TIMESTAMP',
|
||||
'CURRENT_USER',
|
||||
'CURSOR',
|
||||
'DATABASE',
|
||||
'DATABASES',
|
||||
'DAY_HOUR',
|
||||
'DAY_MICROSECOND',
|
||||
'DAY_MINUTE',
|
||||
'DAY_SECOND',
|
||||
'DEC',
|
||||
'DECIMAL',
|
||||
'DECLARE',
|
||||
'DEFAULT',
|
||||
'DELAYED',
|
||||
'DELETE',
|
||||
'DESC',
|
||||
'DESCRIBE',
|
||||
'DETERMINISTIC',
|
||||
'DISTINCT',
|
||||
'DISTINCTROW',
|
||||
'DIV',
|
||||
'DOUBLE',
|
||||
'DROP',
|
||||
'DUAL',
|
||||
'EACH',
|
||||
'ELSE',
|
||||
'ELSEIF',
|
||||
'ENCLOSED',
|
||||
'ESCAPED',
|
||||
'EXISTS',
|
||||
'EXIT',
|
||||
'EXPLAIN',
|
||||
'FALSE',
|
||||
'FETCH',
|
||||
'FLOAT',
|
||||
'FLOAT4',
|
||||
'FLOAT8',
|
||||
'FOR',
|
||||
'FORCE',
|
||||
'FOREIGN',
|
||||
'FROM',
|
||||
'FULLTEXT',
|
||||
'GENERAL',
|
||||
'GOTO',
|
||||
'GRANT',
|
||||
'GROUP',
|
||||
'HAVING',
|
||||
'HIGH_PRIORITY',
|
||||
'HOUR_MICROSECOND',
|
||||
'HOUR_MINUTE',
|
||||
'HOUR_SECOND',
|
||||
'IF',
|
||||
'IGNORE',
|
||||
'IGNORE_SERVER_IDS',
|
||||
'IN',
|
||||
'INDEX',
|
||||
'INFILE',
|
||||
'INNER',
|
||||
'INOUT',
|
||||
'INSENSITIVE',
|
||||
'INSERT',
|
||||
'INT',
|
||||
'INT1',
|
||||
'INT2',
|
||||
'INT3',
|
||||
'INT4',
|
||||
'INT8',
|
||||
'INTEGER',
|
||||
'INTERVAL',
|
||||
'INTO',
|
||||
'IS',
|
||||
'ITERATE',
|
||||
'JOIN',
|
||||
'KEY',
|
||||
'KEYS',
|
||||
'KILL',
|
||||
'LABEL',
|
||||
'LEADING',
|
||||
'LEAVE',
|
||||
'LEFT',
|
||||
'LIKE',
|
||||
'LIMIT',
|
||||
'LINEAR',
|
||||
'LINES',
|
||||
'LOAD',
|
||||
'LOCALTIME',
|
||||
'LOCALTIMESTAMP',
|
||||
'LOCK',
|
||||
'LONG',
|
||||
'LONGBLOB',
|
||||
'LONGTEXT',
|
||||
'LOOP',
|
||||
'LOW_PRIORITY',
|
||||
'MASTER_HEARTBEAT_PERIOD',
|
||||
'MASTER_SSL_VERIFY_SERVER_CERT',
|
||||
'MATCH',
|
||||
'MAXVALUE',
|
||||
'MEDIUMBLOB',
|
||||
'MEDIUMINT',
|
||||
'MEDIUMTEXT',
|
||||
'MIDDLEINT',
|
||||
'MINUTE_MICROSECOND',
|
||||
'MINUTE_SECOND',
|
||||
'MOD',
|
||||
'MODIFIES',
|
||||
'NATURAL',
|
||||
'NO_WRITE_TO_BINLOG',
|
||||
'NOT',
|
||||
'NULL',
|
||||
'NUMERIC',
|
||||
'ON',
|
||||
'OPTIMIZE',
|
||||
'OPTION',
|
||||
'OPTIONALLY',
|
||||
'OR',
|
||||
'ORDER',
|
||||
'OUT',
|
||||
'OUTER',
|
||||
'OUTFILE',
|
||||
'PARTITION',
|
||||
'PRECISION',
|
||||
'PRIMARY',
|
||||
'PROCEDURE',
|
||||
'PURGE',
|
||||
'RAID0',
|
||||
'RANGE',
|
||||
'READ',
|
||||
'READ_WRITE',
|
||||
'READS',
|
||||
'REAL',
|
||||
'RECURSIVE',
|
||||
'REFERENCES',
|
||||
'REGEXP',
|
||||
'RELEASE',
|
||||
'RENAME',
|
||||
'REPEAT',
|
||||
'REPLACE',
|
||||
'REQUIRE',
|
||||
'RESIGNAL',
|
||||
'RESTRICT',
|
||||
'RETURN',
|
||||
'REVOKE',
|
||||
'RIGHT',
|
||||
'RLIKE',
|
||||
'ROWS',
|
||||
'SCHEMA',
|
||||
'SCHEMAS',
|
||||
'SECOND_MICROSECOND',
|
||||
'SELECT',
|
||||
'SENSITIVE',
|
||||
'SEPARATOR',
|
||||
'SET',
|
||||
'SHOW',
|
||||
'SIGNAL',
|
||||
'SLOW',
|
||||
'SMALLINT',
|
||||
'SONAME',
|
||||
'SPATIAL',
|
||||
'SPECIFIC',
|
||||
'SQL',
|
||||
'SQL_BIG_RESULT',
|
||||
'SQL_CALC_FOUND_ROWS',
|
||||
'SQL_SMALL_RESULT',
|
||||
'SQLEXCEPTION',
|
||||
'SQLSTATE',
|
||||
'SQLWARNING',
|
||||
'SSL',
|
||||
'STARTING',
|
||||
'STRAIGHT_JOIN',
|
||||
'TABLE',
|
||||
'TERMINATED',
|
||||
'THEN',
|
||||
'TINYBLOB',
|
||||
'TINYINT',
|
||||
'TINYTEXT',
|
||||
'TO',
|
||||
'TRAILING',
|
||||
'TRIGGER',
|
||||
'TRUE',
|
||||
'UNDO',
|
||||
'UNION',
|
||||
'UNIQUE',
|
||||
'UNLOCK',
|
||||
'UNSIGNED',
|
||||
'UPDATE',
|
||||
'USAGE',
|
||||
'USE',
|
||||
'USING',
|
||||
'UTC_DATE',
|
||||
'UTC_TIME',
|
||||
'UTC_TIMESTAMP',
|
||||
'VALUES',
|
||||
'VARBINARY',
|
||||
'VARCHAR',
|
||||
'VARCHARACTER',
|
||||
'VARYING',
|
||||
'WHEN',
|
||||
'WHERE',
|
||||
'WHILE',
|
||||
'WITH',
|
||||
'WRITE',
|
||||
'X509',
|
||||
'XOR',
|
||||
'YEAR_MONTH',
|
||||
'ZEROFILL',
|
||||
];
|
||||
}
|
||||
}
|
||||
161
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/OracleKeywords.php
vendored
Normal file
161
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/OracleKeywords.php
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* Oracle Keywordlist.
|
||||
*
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.0
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
* @author David Coallier <davidc@php.net>
|
||||
*/
|
||||
class OracleKeywords extends KeywordList
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'Oracle';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return [
|
||||
'ACCESS',
|
||||
'ELSE',
|
||||
'MODIFY',
|
||||
'START',
|
||||
'ADD',
|
||||
'EXCLUSIVE',
|
||||
'NOAUDIT',
|
||||
'SELECT',
|
||||
'ALL',
|
||||
'EXISTS',
|
||||
'NOCOMPRESS',
|
||||
'SESSION',
|
||||
'ALTER',
|
||||
'FILE',
|
||||
'NOT',
|
||||
'SET',
|
||||
'AND',
|
||||
'FLOAT',
|
||||
'NOTFOUND ',
|
||||
'SHARE',
|
||||
'ANY',
|
||||
'FOR',
|
||||
'NOWAIT',
|
||||
'SIZE',
|
||||
'ARRAYLEN',
|
||||
'FROM',
|
||||
'NULL',
|
||||
'SMALLINT',
|
||||
'AS',
|
||||
'GRANT',
|
||||
'NUMBER',
|
||||
'SQLBUF',
|
||||
'ASC',
|
||||
'GROUP',
|
||||
'OF',
|
||||
'SUCCESSFUL',
|
||||
'AUDIT',
|
||||
'HAVING',
|
||||
'OFFLINE ',
|
||||
'SYNONYM',
|
||||
'BETWEEN',
|
||||
'IDENTIFIED',
|
||||
'ON',
|
||||
'SYSDATE',
|
||||
'BY',
|
||||
'IMMEDIATE',
|
||||
'ONLINE',
|
||||
'TABLE',
|
||||
'CHAR',
|
||||
'IN',
|
||||
'OPTION',
|
||||
'THEN',
|
||||
'CHECK',
|
||||
'INCREMENT',
|
||||
'OR',
|
||||
'TO',
|
||||
'CLUSTER',
|
||||
'INDEX',
|
||||
'ORDER',
|
||||
'TRIGGER',
|
||||
'COLUMN',
|
||||
'INITIAL',
|
||||
'PCTFREE',
|
||||
'UID',
|
||||
'COMMENT',
|
||||
'INSERT',
|
||||
'PRIOR',
|
||||
'UNION',
|
||||
'COMPRESS',
|
||||
'INTEGER',
|
||||
'PRIVILEGES',
|
||||
'UNIQUE',
|
||||
'CONNECT',
|
||||
'INTERSECT',
|
||||
'PUBLIC',
|
||||
'UPDATE',
|
||||
'CREATE',
|
||||
'INTO',
|
||||
'RAW',
|
||||
'USER',
|
||||
'CURRENT',
|
||||
'IS',
|
||||
'RENAME',
|
||||
'VALIDATE',
|
||||
'DATE',
|
||||
'LEVEL',
|
||||
'RESOURCE',
|
||||
'VALUES',
|
||||
'DECIMAL',
|
||||
'LIKE',
|
||||
'REVOKE',
|
||||
'VARCHAR',
|
||||
'DEFAULT',
|
||||
'LOCK',
|
||||
'ROW',
|
||||
'VARCHAR2',
|
||||
'DELETE',
|
||||
'LONG',
|
||||
'ROWID',
|
||||
'VIEW',
|
||||
'DESC',
|
||||
'MAXEXTENTS',
|
||||
'ROWLABEL',
|
||||
'WHENEVER',
|
||||
'DISTINCT',
|
||||
'MINUS',
|
||||
'ROWNUM',
|
||||
'WHERE',
|
||||
'DROP',
|
||||
'MODE',
|
||||
'ROWS',
|
||||
'WITH',
|
||||
'RANGE',
|
||||
];
|
||||
}
|
||||
}
|
||||
19
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL100Keywords.php
vendored
Normal file
19
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL100Keywords.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* PostgreSQL 10.0 reserved keywords list.
|
||||
*/
|
||||
class PostgreSQL100Keywords extends PostgreSQL94Keywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName() : string
|
||||
{
|
||||
return 'PostgreSQL100';
|
||||
}
|
||||
}
|
||||
148
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL91Keywords.php
vendored
Normal file
148
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL91Keywords.php
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* PostgreSQL 9.1 reserved keywords list.
|
||||
*
|
||||
* @author Martin Hasoň <martin.hason@gmail.com>
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.5
|
||||
*/
|
||||
class PostgreSQL91Keywords extends PostgreSQLKeywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'PostgreSQL91';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link http://www.postgresql.org/docs/9.1/static/sql-keywords-appendix.html
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return [
|
||||
'ALL',
|
||||
'ANALYSE',
|
||||
'ANALYZE',
|
||||
'AND',
|
||||
'ANY',
|
||||
'ARRAY',
|
||||
'AS',
|
||||
'ASC',
|
||||
'ASYMMETRIC',
|
||||
'AUTHORIZATION',
|
||||
'BINARY',
|
||||
'BOTH',
|
||||
'CASE',
|
||||
'CAST',
|
||||
'CHECK',
|
||||
'COLLATE',
|
||||
'COLUMN',
|
||||
'CONCURRENTLY',
|
||||
'CONSTRAINT',
|
||||
'CREATE',
|
||||
'CROSS',
|
||||
'CURRENT_CATALOG',
|
||||
'CURRENT_DATE',
|
||||
'CURRENT_ROLE',
|
||||
'CURRENT_SCHEMA',
|
||||
'CURRENT_TIME',
|
||||
'CURRENT_TIMESTAMP',
|
||||
'CURRENT_USER',
|
||||
'DEFAULT',
|
||||
'DEFERRABLE',
|
||||
'DESC',
|
||||
'DISTINCT',
|
||||
'DO',
|
||||
'ELSE',
|
||||
'END',
|
||||
'EXCEPT',
|
||||
'FALSE',
|
||||
'FETCH',
|
||||
'FOR',
|
||||
'FOREIGN',
|
||||
'FREEZE',
|
||||
'FROM',
|
||||
'FULL',
|
||||
'GRANT',
|
||||
'GROUP',
|
||||
'HAVING',
|
||||
'ILIKE',
|
||||
'IN',
|
||||
'INITIALLY',
|
||||
'INNER',
|
||||
'INTERSECT',
|
||||
'INTO',
|
||||
'IS',
|
||||
'ISNULL',
|
||||
'JOIN',
|
||||
'LEADING',
|
||||
'LEFT',
|
||||
'LIKE',
|
||||
'LIMIT',
|
||||
'LOCALTIME',
|
||||
'LOCALTIMESTAMP',
|
||||
'NATURAL',
|
||||
'NOT',
|
||||
'NOTNULL',
|
||||
'NULL',
|
||||
'OFFSET',
|
||||
'ON',
|
||||
'ONLY',
|
||||
'OR',
|
||||
'ORDER',
|
||||
'OUTER',
|
||||
'OVER',
|
||||
'OVERLAPS',
|
||||
'PLACING',
|
||||
'PRIMARY',
|
||||
'REFERENCES',
|
||||
'RETURNING',
|
||||
'RIGHT',
|
||||
'SELECT',
|
||||
'SESSION_USER',
|
||||
'SIMILAR',
|
||||
'SOME',
|
||||
'SYMMETRIC',
|
||||
'TABLE',
|
||||
'THEN',
|
||||
'TO',
|
||||
'TRAILING',
|
||||
'TRUE',
|
||||
'UNION',
|
||||
'UNIQUE',
|
||||
'USER',
|
||||
'USING',
|
||||
'VARIADIC',
|
||||
'VERBOSE',
|
||||
'WHEN',
|
||||
'WHERE',
|
||||
'WINDOW',
|
||||
'WITH',
|
||||
];
|
||||
}
|
||||
}
|
||||
52
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL92Keywords.php
vendored
Normal file
52
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL92Keywords.php
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
use function array_merge;
|
||||
|
||||
/**
|
||||
* PostgreSQL 9.2 reserved keywords list.
|
||||
*
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.5
|
||||
*/
|
||||
class PostgreSQL92Keywords extends PostgreSQL91Keywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'PostgreSQL92';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link http://www.postgresql.org/docs/9.2/static/sql-keywords-appendix.html
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return array_merge(parent::getKeywords(), [
|
||||
'COLLATION',
|
||||
]);
|
||||
}
|
||||
}
|
||||
57
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php
vendored
Normal file
57
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
use function array_diff;
|
||||
use function array_merge;
|
||||
|
||||
/**
|
||||
* PostgreSQL 9.4 reserved keywords list.
|
||||
*
|
||||
* @author Matteo Beccati <matteo@beccati.com>
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.6
|
||||
*/
|
||||
class PostgreSQL94Keywords extends PostgreSQL92Keywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'PostgreSQL94';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link http://www.postgresql.org/docs/9.4/static/sql-keywords-appendix.html
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
$parentKeywords = array_diff(parent::getKeywords(), [
|
||||
'OVER',
|
||||
]);
|
||||
|
||||
return array_merge($parentKeywords, [
|
||||
'LATERAL',
|
||||
]);
|
||||
}
|
||||
}
|
||||
135
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php
vendored
Normal file
135
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* PostgreSQL Keywordlist.
|
||||
*
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.0
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
* @author Marcelo Santos Araujo <msaraujo@php.net>
|
||||
*/
|
||||
class PostgreSQLKeywords extends KeywordList
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'PostgreSQL';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return [
|
||||
'ALL',
|
||||
'ANALYSE',
|
||||
'ANALYZE',
|
||||
'AND',
|
||||
'ANY',
|
||||
'AS',
|
||||
'ASC',
|
||||
'AUTHORIZATION',
|
||||
'BETWEEN',
|
||||
'BINARY',
|
||||
'BOTH',
|
||||
'CASE',
|
||||
'CAST',
|
||||
'CHECK',
|
||||
'COLLATE',
|
||||
'COLUMN',
|
||||
'CONSTRAINT',
|
||||
'CREATE',
|
||||
'CURRENT_DATE',
|
||||
'CURRENT_TIME',
|
||||
'CURRENT_TIMESTAMP',
|
||||
'CURRENT_USER',
|
||||
'DEFAULT',
|
||||
'DEFERRABLE',
|
||||
'DESC',
|
||||
'DISTINCT',
|
||||
'DO',
|
||||
'ELSE',
|
||||
'END',
|
||||
'EXCEPT',
|
||||
'FALSE',
|
||||
'FOR',
|
||||
'FOREIGN',
|
||||
'FREEZE',
|
||||
'FROM',
|
||||
'FULL',
|
||||
'GRANT',
|
||||
'GROUP',
|
||||
'HAVING',
|
||||
'ILIKE',
|
||||
'IN',
|
||||
'INITIALLY',
|
||||
'INNER',
|
||||
'INTERSECT',
|
||||
'INTO',
|
||||
'IS',
|
||||
'ISNULL',
|
||||
'JOIN',
|
||||
'LEADING',
|
||||
'LEFT',
|
||||
'LIKE',
|
||||
'LIMIT',
|
||||
'LOCALTIME',
|
||||
'LOCALTIMESTAMP',
|
||||
'NATURAL',
|
||||
'NEW',
|
||||
'NOT',
|
||||
'NOTNULL',
|
||||
'NULL',
|
||||
'OFF',
|
||||
'OFFSET',
|
||||
'OLD',
|
||||
'ON',
|
||||
'ONLY',
|
||||
'OR',
|
||||
'ORDER',
|
||||
'OUTER',
|
||||
'OVERLAPS',
|
||||
'PLACING',
|
||||
'PRIMARY',
|
||||
'REFERENCES',
|
||||
'SELECT',
|
||||
'SESSION_USER',
|
||||
'SIMILAR',
|
||||
'SOME',
|
||||
'TABLE',
|
||||
'THEN',
|
||||
'TO',
|
||||
'TRAILING',
|
||||
'TRUE',
|
||||
'UNION',
|
||||
'UNIQUE',
|
||||
'USER',
|
||||
'USING',
|
||||
'VERBOSE',
|
||||
'WHEN',
|
||||
'WHERE'
|
||||
];
|
||||
}
|
||||
}
|
||||
145
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php
vendored
Normal file
145
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
use Doctrine\DBAL\Schema\Visitor\Visitor;
|
||||
use Doctrine\DBAL\Schema\Table;
|
||||
use Doctrine\DBAL\Schema\Column;
|
||||
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\DBAL\Schema\Sequence;
|
||||
use Doctrine\DBAL\Schema\Index;
|
||||
use function implode;
|
||||
use function str_replace;
|
||||
|
||||
class ReservedKeywordsValidator implements Visitor
|
||||
{
|
||||
/**
|
||||
* @var KeywordList[]
|
||||
*/
|
||||
private $keywordLists = [];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $violations = [];
|
||||
|
||||
/**
|
||||
* @param \Doctrine\DBAL\Platforms\Keywords\KeywordList[] $keywordLists
|
||||
*/
|
||||
public function __construct(array $keywordLists)
|
||||
{
|
||||
$this->keywordLists = $keywordLists;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getViolations()
|
||||
{
|
||||
return $this->violations;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $word
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function isReservedWord($word)
|
||||
{
|
||||
if ($word[0] == "`") {
|
||||
$word = str_replace('`', '', $word);
|
||||
}
|
||||
|
||||
$keywordLists = [];
|
||||
foreach ($this->keywordLists as $keywordList) {
|
||||
if ($keywordList->isKeyword($word)) {
|
||||
$keywordLists[] = $keywordList->getName();
|
||||
}
|
||||
}
|
||||
|
||||
return $keywordLists;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $asset
|
||||
* @param array $violatedPlatforms
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addViolation($asset, $violatedPlatforms)
|
||||
{
|
||||
if ( ! $violatedPlatforms) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->violations[] = $asset . ' keyword violations: ' . implode(', ', $violatedPlatforms);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function acceptColumn(Table $table, Column $column)
|
||||
{
|
||||
$this->addViolation(
|
||||
'Table ' . $table->getName() . ' column ' . $column->getName(),
|
||||
$this->isReservedWord($column->getName())
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function acceptIndex(Table $table, Index $index)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function acceptSchema(Schema $schema)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function acceptSequence(Sequence $sequence)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function acceptTable(Table $table)
|
||||
{
|
||||
$this->addViolation(
|
||||
'Table ' . $table->getName(),
|
||||
$this->isReservedWord($table->getName())
|
||||
);
|
||||
}
|
||||
}
|
||||
58
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php
vendored
Normal file
58
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
use function array_diff;
|
||||
use function array_merge;
|
||||
|
||||
/**
|
||||
* SAP Sybase SQL Anywhere 11 reserved keywords list.
|
||||
*
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
*/
|
||||
class SQLAnywhere11Keywords extends SQLAnywhereKeywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'SQLAnywhere11';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link http://dcx.sybase.com/1100/en/dbreference_en11/alhakeywords.html
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return array_merge(
|
||||
array_diff(
|
||||
parent::getKeywords(),
|
||||
['IQ']
|
||||
),
|
||||
[
|
||||
'MERGE',
|
||||
'OPENSTRING'
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
67
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere12Keywords.php
vendored
Normal file
67
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere12Keywords.php
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
use function array_diff;
|
||||
use function array_merge;
|
||||
|
||||
/**
|
||||
* SAP Sybase SQL Anywhere 12 reserved keywords list.
|
||||
*
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
*/
|
||||
class SQLAnywhere12Keywords extends SQLAnywhere11Keywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'SQLAnywhere12';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link http://dcx.sybase.com/1200/en/dbreference/alhakeywords.html
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return array_merge(
|
||||
array_diff(
|
||||
parent::getKeywords(),
|
||||
[
|
||||
'INDEX_LPAREN',
|
||||
'SYNTAX_ERROR',
|
||||
'WITH_CUBE',
|
||||
'WITH_LPAREN',
|
||||
'WITH_ROLLUP'
|
||||
]
|
||||
),
|
||||
[
|
||||
'DATETIMEOFFSET',
|
||||
'LIMIT',
|
||||
'OPENXML',
|
||||
'SPATIAL',
|
||||
'TREAT'
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
58
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php
vendored
Normal file
58
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
use function array_merge;
|
||||
|
||||
/**
|
||||
* SAP Sybase SQL Anywhere 16 reserved keywords list.
|
||||
*
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
*/
|
||||
class SQLAnywhere16Keywords extends SQLAnywhere12Keywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'SQLAnywhere16';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link http://dcx.sybase.com/index.html#sa160/en/dbreference/alhakeywords.html
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return array_merge(
|
||||
parent::getKeywords(),
|
||||
[
|
||||
'ARRAY',
|
||||
'JSON',
|
||||
'ROW',
|
||||
'ROWTYPE',
|
||||
'UNNEST',
|
||||
'VARRAY'
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
281
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php
vendored
Normal file
281
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php
vendored
Normal file
@@ -0,0 +1,281 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* SAP Sybase SQL Anywhere 10 reserved keywords list.
|
||||
*
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
*/
|
||||
class SQLAnywhereKeywords extends KeywordList
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'SQLAnywhere';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link http://infocenter.sybase.com/help/topic/com.sybase.dbrfen10/pdf/dbrfen10.pdf?noframes=true
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return [
|
||||
'ADD',
|
||||
'ALL',
|
||||
'ALTER',
|
||||
'AND',
|
||||
'ANY',
|
||||
'AS',
|
||||
'ASC',
|
||||
'ATTACH',
|
||||
'BACKUP',
|
||||
'BEGIN',
|
||||
'BETWEEN',
|
||||
'BIGINT',
|
||||
'BINARY',
|
||||
'BIT',
|
||||
'BOTTOM',
|
||||
'BREAK',
|
||||
'BY',
|
||||
'CALL',
|
||||
'CAPABILITY',
|
||||
'CASCADE',
|
||||
'CASE',
|
||||
'CAST',
|
||||
'CHAR',
|
||||
'CHAR_CONVERT',
|
||||
'CHARACTER',
|
||||
'CHECK',
|
||||
'CHECKPOINT',
|
||||
'CLOSE',
|
||||
'COMMENT',
|
||||
'COMMIT',
|
||||
'COMPRESSED',
|
||||
'CONFLICT',
|
||||
'CONNECT',
|
||||
'CONSTRAINT',
|
||||
'CONTAINS',
|
||||
'CONTINUE',
|
||||
'CONVERT',
|
||||
'CREATE',
|
||||
'CROSS',
|
||||
'CUBE',
|
||||
'CURRENT',
|
||||
'CURRENT_TIMESTAMP',
|
||||
'CURRENT_USER',
|
||||
'CURSOR',
|
||||
'DATE',
|
||||
'DBSPACE',
|
||||
'DEALLOCATE',
|
||||
'DEC',
|
||||
'DECIMAL',
|
||||
'DECLARE',
|
||||
'DEFAULT',
|
||||
'DELETE',
|
||||
'DELETING',
|
||||
'DESC',
|
||||
'DETACH',
|
||||
'DISTINCT',
|
||||
'DO',
|
||||
'DOUBLE',
|
||||
'DROP',
|
||||
'DYNAMIC',
|
||||
'ELSE',
|
||||
'ELSEIF',
|
||||
'ENCRYPTED',
|
||||
'END',
|
||||
'ENDIF',
|
||||
'ESCAPE',
|
||||
'EXCEPT',
|
||||
'EXCEPTION',
|
||||
'EXEC',
|
||||
'EXECUTE',
|
||||
'EXISTING',
|
||||
'EXISTS',
|
||||
'EXTERNLOGIN',
|
||||
'FETCH',
|
||||
'FIRST',
|
||||
'FLOAT',
|
||||
'FOR',
|
||||
'FORCE',
|
||||
'FOREIGN',
|
||||
'FORWARD',
|
||||
'FROM',
|
||||
'FULL',
|
||||
'GOTO',
|
||||
'GRANT',
|
||||
'GROUP',
|
||||
'HAVING',
|
||||
'HOLDLOCK',
|
||||
'IDENTIFIED',
|
||||
'IF',
|
||||
'IN',
|
||||
'INDEX',
|
||||
'INDEX_LPAREN',
|
||||
'INNER',
|
||||
'INOUT',
|
||||
'INSENSITIVE',
|
||||
'INSERT',
|
||||
'INSERTING',
|
||||
'INSTALL',
|
||||
'INSTEAD',
|
||||
'INT',
|
||||
'INTEGER',
|
||||
'INTEGRATED',
|
||||
'INTERSECT',
|
||||
'INTO',
|
||||
'IQ',
|
||||
'IS',
|
||||
'ISOLATION',
|
||||
'JOIN',
|
||||
'KERBEROS',
|
||||
'KEY',
|
||||
'LATERAL',
|
||||
'LEFT',
|
||||
'LIKE',
|
||||
'LOCK',
|
||||
'LOGIN',
|
||||
'LONG',
|
||||
'MATCH',
|
||||
'MEMBERSHIP',
|
||||
'MESSAGE',
|
||||
'MODE',
|
||||
'MODIFY',
|
||||
'NATURAL',
|
||||
'NCHAR',
|
||||
'NEW',
|
||||
'NO',
|
||||
'NOHOLDLOCK',
|
||||
'NOT',
|
||||
'NOTIFY',
|
||||
'NULL',
|
||||
'NUMERIC',
|
||||
'NVARCHAR',
|
||||
'OF',
|
||||
'OFF',
|
||||
'ON',
|
||||
'OPEN',
|
||||
'OPTION',
|
||||
'OPTIONS',
|
||||
'OR',
|
||||
'ORDER',
|
||||
'OTHERS',
|
||||
'OUT',
|
||||
'OUTER',
|
||||
'OVER',
|
||||
'PASSTHROUGH',
|
||||
'PRECISION',
|
||||
'PREPARE',
|
||||
'PRIMARY',
|
||||
'PRINT',
|
||||
'PRIVILEGES',
|
||||
'PROC',
|
||||
'PROCEDURE',
|
||||
'PUBLICATION',
|
||||
'RAISERROR',
|
||||
'READTEXT',
|
||||
'REAL',
|
||||
'REFERENCE',
|
||||
'REFERENCES',
|
||||
'REFRESH',
|
||||
'RELEASE',
|
||||
'REMOTE',
|
||||
'REMOVE',
|
||||
'RENAME',
|
||||
'REORGANIZE',
|
||||
'RESOURCE',
|
||||
'RESTORE',
|
||||
'RESTRICT',
|
||||
'RETURN',
|
||||
'REVOKE',
|
||||
'RIGHT',
|
||||
'ROLLBACK',
|
||||
'ROLLUP',
|
||||
'SAVE',
|
||||
'SAVEPOINT',
|
||||
'SCROLL',
|
||||
'SELECT',
|
||||
'SENSITIVE',
|
||||
'SESSION',
|
||||
'SET',
|
||||
'SETUSER',
|
||||
'SHARE',
|
||||
'SMALLINT',
|
||||
'SOME',
|
||||
'SQLCODE',
|
||||
'SQLSTATE',
|
||||
'START',
|
||||
'STOP',
|
||||
'SUBTRANS',
|
||||
'SUBTRANSACTION',
|
||||
'SYNCHRONIZE',
|
||||
'SYNTAX_ERROR',
|
||||
'TABLE',
|
||||
'TEMPORARY',
|
||||
'THEN',
|
||||
'TIME',
|
||||
'TIMESTAMP',
|
||||
'TINYINT',
|
||||
'TO',
|
||||
'TOP',
|
||||
'TRAN',
|
||||
'TRIGGER',
|
||||
'TRUNCATE',
|
||||
'TSEQUAL',
|
||||
'UNBOUNDED',
|
||||
'UNION',
|
||||
'UNIQUE',
|
||||
'UNIQUEIDENTIFIER',
|
||||
'UNKNOWN',
|
||||
'UNSIGNED',
|
||||
'UPDATE',
|
||||
'UPDATING',
|
||||
'USER',
|
||||
'USING',
|
||||
'VALIDATE',
|
||||
'VALUES',
|
||||
'VARBINARY',
|
||||
'VARBIT',
|
||||
'VARCHAR',
|
||||
'VARIABLE',
|
||||
'VARYING',
|
||||
'VIEW',
|
||||
'WAIT',
|
||||
'WAITFOR',
|
||||
'WHEN',
|
||||
'WHERE',
|
||||
'WHILE',
|
||||
'WINDOW',
|
||||
'WITH',
|
||||
'WITH_CUBE',
|
||||
'WITH_LPAREN',
|
||||
'WITH_ROLLUP',
|
||||
'WITHIN',
|
||||
'WORK',
|
||||
'WRITETEXT',
|
||||
'XML'
|
||||
];
|
||||
}
|
||||
}
|
||||
59
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php
vendored
Normal file
59
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
use function array_diff;
|
||||
use function array_merge;
|
||||
|
||||
/**
|
||||
* Microsoft SQL Server 2005 reserved keyword dictionary.
|
||||
*
|
||||
* @license BSD http://www.opensource.org/licenses/bsd-license.php
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.3
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
*/
|
||||
class SQLServer2005Keywords extends SQLServerKeywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'SQLServer2005';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link http://msdn.microsoft.com/en-US/library/ms189822%28v=sql.90%29.aspx
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return array_merge(array_diff(parent::getKeywords(), ['DUMMY']), [
|
||||
'EXTERNAL',
|
||||
'PIVOT',
|
||||
'REVERT',
|
||||
'SECURITYAUDIT',
|
||||
'TABLESAMPLE',
|
||||
'UNPIVOT'
|
||||
]);
|
||||
}
|
||||
}
|
||||
53
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2008Keywords.php
vendored
Normal file
53
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2008Keywords.php
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
use function array_merge;
|
||||
|
||||
/**
|
||||
* Microsoft SQL Server 2008 reserved keyword dictionary.
|
||||
*
|
||||
* @license BSD http://www.opensource.org/licenses/bsd-license.php
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.3
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
*/
|
||||
class SQLServer2008Keywords extends SQLServer2005Keywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'SQLServer2008';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link http://msdn.microsoft.com/en-us/library/ms189822%28v=sql.100%29.aspx
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return array_merge(parent::getKeywords(), [
|
||||
'MERGE'
|
||||
]);
|
||||
}
|
||||
}
|
||||
57
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php
vendored
Normal file
57
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
use function array_merge;
|
||||
|
||||
/**
|
||||
* Microsoft SQL Server 2012 reserved keyword dictionary.
|
||||
*
|
||||
* @license BSD http://www.opensource.org/licenses/bsd-license.php
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.3
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
*/
|
||||
class SQLServer2012Keywords extends SQLServer2008Keywords
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'SQLServer2012';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link http://msdn.microsoft.com/en-us/library/ms189822.aspx
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return array_merge(parent::getKeywords(), [
|
||||
'SEMANTICKEYPHRASETABLE',
|
||||
'SEMANTICSIMILARITYDETAILSTABLE',
|
||||
'SEMANTICSIMILARITYTABLE',
|
||||
'TRY_CONVERT',
|
||||
'WITHIN GROUP'
|
||||
]);
|
||||
}
|
||||
}
|
||||
231
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServerKeywords.php
vendored
Normal file
231
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLServerKeywords.php
vendored
Normal file
@@ -0,0 +1,231 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* Microsoft SQL Server 2000 reserved keyword dictionary.
|
||||
*
|
||||
* @license BSD http://www.opensource.org/licenses/bsd-license.php
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.0
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
* @author David Coallier <davidc@php.net>
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
*/
|
||||
class SQLServerKeywords extends KeywordList
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'SQLServer';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link http://msdn.microsoft.com/en-us/library/aa238507%28v=sql.80%29.aspx
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return [
|
||||
'ADD',
|
||||
'ALL',
|
||||
'ALTER',
|
||||
'AND',
|
||||
'ANY',
|
||||
'AS',
|
||||
'ASC',
|
||||
'AUTHORIZATION',
|
||||
'BACKUP',
|
||||
'BEGIN',
|
||||
'BETWEEN',
|
||||
'BREAK',
|
||||
'BROWSE',
|
||||
'BULK',
|
||||
'BY',
|
||||
'CASCADE',
|
||||
'CASE',
|
||||
'CHECK',
|
||||
'CHECKPOINT',
|
||||
'CLOSE',
|
||||
'CLUSTERED',
|
||||
'COALESCE',
|
||||
'COLLATE',
|
||||
'COLUMN',
|
||||
'COMMIT',
|
||||
'COMPUTE',
|
||||
'CONSTRAINT',
|
||||
'CONTAINS',
|
||||
'CONTAINSTABLE',
|
||||
'CONTINUE',
|
||||
'CONVERT',
|
||||
'CREATE',
|
||||
'CROSS',
|
||||
'CURRENT',
|
||||
'CURRENT_DATE',
|
||||
'CURRENT_TIME',
|
||||
'CURRENT_TIMESTAMP',
|
||||
'CURRENT_USER',
|
||||
'CURSOR',
|
||||
'DATABASE',
|
||||
'DBCC',
|
||||
'DEALLOCATE',
|
||||
'DECLARE',
|
||||
'DEFAULT',
|
||||
'DELETE',
|
||||
'DENY',
|
||||
'DESC',
|
||||
'DISK',
|
||||
'DISTINCT',
|
||||
'DISTRIBUTED',
|
||||
'DOUBLE',
|
||||
'DROP',
|
||||
'DUMP',
|
||||
'ELSE',
|
||||
'END',
|
||||
'ERRLVL',
|
||||
'ESCAPE',
|
||||
'EXCEPT',
|
||||
'EXEC',
|
||||
'EXECUTE',
|
||||
'EXISTS',
|
||||
'EXIT',
|
||||
'EXTERNAL',
|
||||
'FETCH',
|
||||
'FILE',
|
||||
'FILLFACTOR',
|
||||
'FOR',
|
||||
'FOREIGN',
|
||||
'FREETEXT',
|
||||
'FREETEXTTABLE',
|
||||
'FROM',
|
||||
'FULL',
|
||||
'FUNCTION',
|
||||
'GOTO',
|
||||
'GRANT',
|
||||
'GROUP',
|
||||
'HAVING',
|
||||
'HOLDLOCK',
|
||||
'IDENTITY',
|
||||
'IDENTITY_INSERT',
|
||||
'IDENTITYCOL',
|
||||
'IF',
|
||||
'IN',
|
||||
'INDEX',
|
||||
'INNER',
|
||||
'INSERT',
|
||||
'INTERSECT',
|
||||
'INTO',
|
||||
'IS',
|
||||
'JOIN',
|
||||
'KEY',
|
||||
'KILL',
|
||||
'LEFT',
|
||||
'LIKE',
|
||||
'LINENO',
|
||||
'LOAD',
|
||||
'NATIONAL',
|
||||
'NOCHECK ',
|
||||
'NONCLUSTERED',
|
||||
'NOT',
|
||||
'NULL',
|
||||
'NULLIF',
|
||||
'OF',
|
||||
'OFF',
|
||||
'OFFSETS',
|
||||
'ON',
|
||||
'OPEN',
|
||||
'OPENDATASOURCE',
|
||||
'OPENQUERY',
|
||||
'OPENROWSET',
|
||||
'OPENXML',
|
||||
'OPTION',
|
||||
'OR',
|
||||
'ORDER',
|
||||
'OUTER',
|
||||
'OVER',
|
||||
'PERCENT',
|
||||
'PIVOT',
|
||||
'PLAN',
|
||||
'PRECISION',
|
||||
'PRIMARY',
|
||||
'PRINT',
|
||||
'PROC',
|
||||
'PROCEDURE',
|
||||
'PUBLIC',
|
||||
'RAISERROR',
|
||||
'READ',
|
||||
'READTEXT',
|
||||
'RECONFIGURE',
|
||||
'REFERENCES',
|
||||
'REPLICATION',
|
||||
'RESTORE',
|
||||
'RESTRICT',
|
||||
'RETURN',
|
||||
'REVERT',
|
||||
'REVOKE',
|
||||
'RIGHT',
|
||||
'ROLLBACK',
|
||||
'ROWCOUNT',
|
||||
'ROWGUIDCOL',
|
||||
'RULE',
|
||||
'SAVE',
|
||||
'SCHEMA',
|
||||
'SECURITYAUDIT',
|
||||
'SELECT',
|
||||
'SESSION_USER',
|
||||
'SET',
|
||||
'SETUSER',
|
||||
'SHUTDOWN',
|
||||
'SOME',
|
||||
'STATISTICS',
|
||||
'SYSTEM_USER',
|
||||
'TABLE',
|
||||
'TABLESAMPLE',
|
||||
'TEXTSIZE',
|
||||
'THEN',
|
||||
'TO',
|
||||
'TOP',
|
||||
'TRAN',
|
||||
'TRANSACTION',
|
||||
'TRIGGER',
|
||||
'TRUNCATE',
|
||||
'TSEQUAL',
|
||||
'UNION',
|
||||
'UNIQUE',
|
||||
'UNPIVOT',
|
||||
'UPDATE',
|
||||
'UPDATETEXT',
|
||||
'USE',
|
||||
'USER',
|
||||
'VALUES',
|
||||
'VARYING',
|
||||
'VIEW',
|
||||
'WAITFOR',
|
||||
'WHEN',
|
||||
'WHERE',
|
||||
'WHILE',
|
||||
'WITH',
|
||||
'WRITETEXT'
|
||||
];
|
||||
}
|
||||
}
|
||||
168
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLiteKeywords.php
vendored
Normal file
168
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLiteKeywords.php
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms\Keywords;
|
||||
|
||||
/**
|
||||
* SQLite Keywordlist.
|
||||
*
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.0
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
*/
|
||||
class SQLiteKeywords extends KeywordList
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'SQLite';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getKeywords()
|
||||
{
|
||||
return [
|
||||
'ABORT',
|
||||
'ACTION',
|
||||
'ADD',
|
||||
'AFTER',
|
||||
'ALL',
|
||||
'ALTER',
|
||||
'ANALYZE',
|
||||
'AND',
|
||||
'AS',
|
||||
'ASC',
|
||||
'ATTACH',
|
||||
'AUTOINCREMENT',
|
||||
'BEFORE',
|
||||
'BEGIN',
|
||||
'BETWEEN',
|
||||
'BY',
|
||||
'CASCADE',
|
||||
'CASE',
|
||||
'CAST',
|
||||
'CHECK',
|
||||
'COLLATE',
|
||||
'COLUMN',
|
||||
'COMMIT',
|
||||
'CONFLICT',
|
||||
'CONSTRAINT',
|
||||
'CREATE',
|
||||
'CROSS',
|
||||
'CURRENT_DATE',
|
||||
'CURRENT_TIME',
|
||||
'CURRENT_TIMESTAMP',
|
||||
'DATABASE',
|
||||
'DEFAULT',
|
||||
'DEFERRABLE',
|
||||
'DEFERRED',
|
||||
'DELETE',
|
||||
'DESC',
|
||||
'DETACH',
|
||||
'DISTINCT',
|
||||
'DROP',
|
||||
'EACH',
|
||||
'ELSE',
|
||||
'END',
|
||||
'ESCAPE',
|
||||
'EXCEPT',
|
||||
'EXCLUSIVE',
|
||||
'EXISTS',
|
||||
'EXPLAIN',
|
||||
'FAIL',
|
||||
'FOR',
|
||||
'FOREIGN',
|
||||
'FROM',
|
||||
'FULL',
|
||||
'GLOB',
|
||||
'GROUP',
|
||||
'HAVING',
|
||||
'IF',
|
||||
'IGNORE',
|
||||
'IMMEDIATE',
|
||||
'IN',
|
||||
'INDEX',
|
||||
'INDEXED',
|
||||
'INITIALLY',
|
||||
'INNER',
|
||||
'INSERT',
|
||||
'INSTEAD',
|
||||
'INTERSECT',
|
||||
'INTO',
|
||||
'IS',
|
||||
'ISNULL',
|
||||
'JOIN',
|
||||
'KEY',
|
||||
'LEFT',
|
||||
'LIKE',
|
||||
'LIMIT',
|
||||
'MATCH',
|
||||
'NATURAL',
|
||||
'NO',
|
||||
'NOT',
|
||||
'NOTNULL',
|
||||
'NULL',
|
||||
'OF',
|
||||
'OFFSET',
|
||||
'ON',
|
||||
'OR',
|
||||
'ORDER',
|
||||
'OUTER',
|
||||
'PLAN',
|
||||
'PRAGMA',
|
||||
'PRIMARY',
|
||||
'QUERY',
|
||||
'RAISE',
|
||||
'REFERENCES',
|
||||
'REGEXP',
|
||||
'REINDEX',
|
||||
'RELEASE',
|
||||
'RENAME',
|
||||
'REPLACE',
|
||||
'RESTRICT',
|
||||
'RIGHT',
|
||||
'ROLLBACK',
|
||||
'ROW',
|
||||
'SAVEPOINT',
|
||||
'SELECT',
|
||||
'SET',
|
||||
'TABLE',
|
||||
'TEMP',
|
||||
'TEMPORARY',
|
||||
'THEN',
|
||||
'TO',
|
||||
'TRANSACTION',
|
||||
'TRIGGER',
|
||||
'UNION',
|
||||
'UNIQUE',
|
||||
'UPDATE',
|
||||
'USING',
|
||||
'VACUUM',
|
||||
'VALUES',
|
||||
'VIEW',
|
||||
'VIRTUAL',
|
||||
'WHEN',
|
||||
'WHERE'
|
||||
];
|
||||
}
|
||||
}
|
||||
69
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MariaDb1027Platform.php
vendored
Normal file
69
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MariaDb1027Platform.php
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
|
||||
/**
|
||||
* Provides the behavior, features and SQL dialect of the MariaDB 10.2 (10.2.7 GA) database platform.
|
||||
*
|
||||
* Note: Should not be used with versions prior ro 10.2.7.
|
||||
*
|
||||
* @author Vanvelthem Sébastien
|
||||
* @link www.doctrine-project.org
|
||||
*/
|
||||
final class MariaDb1027Platform extends MySqlPlatform
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function hasNativeJsonType() : bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @link https://mariadb.com/kb/en/library/json-data-type/
|
||||
*/
|
||||
public function getJsonTypeDeclarationSQL(array $field) : string
|
||||
{
|
||||
return 'LONGTEXT';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getReservedKeywordsClass() : string
|
||||
{
|
||||
return Keywords\MariaDb102Keywords::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function initializeDoctrineTypeMappings() : void
|
||||
{
|
||||
parent::initializeDoctrineTypeMappings();
|
||||
|
||||
$this->doctrineTypeMapping['json'] = Type::JSON;
|
||||
}
|
||||
}
|
||||
95
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySQL57Platform.php
vendored
Normal file
95
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySQL57Platform.php
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
use Doctrine\DBAL\Schema\Index;
|
||||
use Doctrine\DBAL\Schema\TableDiff;
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
|
||||
/**
|
||||
* Provides the behavior, features and SQL dialect of the MySQL 5.7 (5.7.9 GA) database platform.
|
||||
*
|
||||
* @author İsmail BASKIN <ismailbaskin1@gmail.com>
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.5
|
||||
*/
|
||||
class MySQL57Platform extends MySqlPlatform
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function hasNativeJsonType()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getJsonTypeDeclarationSQL(array $field)
|
||||
{
|
||||
return 'JSON';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getPreAlterTableRenameIndexForeignKeySQL(TableDiff $diff)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getPostAlterTableRenameIndexForeignKeySQL(TableDiff $diff)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName)
|
||||
{
|
||||
return [
|
||||
'ALTER TABLE ' . $tableName . ' RENAME INDEX ' . $oldIndexName . ' TO ' . $index->getQuotedName($this)
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\MySQL57Keywords::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function initializeDoctrineTypeMappings()
|
||||
{
|
||||
parent::initializeDoctrineTypeMappings();
|
||||
|
||||
$this->doctrineTypeMapping['json'] = Type::JSON;
|
||||
}
|
||||
}
|
||||
36
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySQL80Platform.php
vendored
Normal file
36
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySQL80Platform.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
/**
|
||||
* Provides the behavior, features and SQL dialect of the MySQL 8.0 (8.0 GA) database platform.
|
||||
*
|
||||
* @link www.doctrine-project.org
|
||||
*/
|
||||
class MySQL80Platform extends MySQL57Platform
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\MySQL80Keywords::class;
|
||||
}
|
||||
}
|
||||
1153
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
vendored
Normal file
1153
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1193
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/OraclePlatform.php
vendored
Normal file
1193
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/OraclePlatform.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
33
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL100Platform.php
vendored
Normal file
33
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL100Platform.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
use Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords;
|
||||
|
||||
/**
|
||||
* Provides the behavior, features and SQL dialect of the PostgreSQL 10.0 database platform.
|
||||
*/
|
||||
class PostgreSQL100Platform extends PostgreSQL94Platform
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getReservedKeywordsClass() : string
|
||||
{
|
||||
return PostgreSQL100Keywords::class;
|
||||
}
|
||||
|
||||
public function getListSequencesSQL($database) : string
|
||||
{
|
||||
return "SELECT sequence_name AS relname,
|
||||
sequence_schema AS schemaname,
|
||||
minimum_value AS min_value,
|
||||
increment AS increment_by
|
||||
FROM information_schema.sequences
|
||||
WHERE sequence_catalog = " . $this->quoteStringLiteral($database) . "
|
||||
AND sequence_schema NOT LIKE 'pg\_%'
|
||||
AND sequence_schema != 'information_schema'";
|
||||
}
|
||||
}
|
||||
67
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL91Platform.php
vendored
Normal file
67
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL91Platform.php
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
use function explode;
|
||||
|
||||
/**
|
||||
* Provides the behavior, features and SQL dialect of the PostgreSQL 9.1 database platform.
|
||||
*
|
||||
* @author Martin Hasoň <martin.hason@gmail.com>
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.5
|
||||
*/
|
||||
class PostgreSQL91Platform extends PostgreSqlPlatform
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function supportsColumnCollation()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\PostgreSQL91Keywords::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getColumnCollationDeclarationSQL($collation)
|
||||
{
|
||||
return 'COLLATE ' . $this->quoteSingleIdentifier($collation);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getListTableColumnsSQL($table, $database = null)
|
||||
{
|
||||
$sql = parent::getListTableColumnsSQL($table, $database);
|
||||
$parts = explode('AS complete_type,', $sql, 2);
|
||||
|
||||
return $parts[0].'AS complete_type, (SELECT tc.collcollate FROM pg_catalog.pg_collation tc WHERE tc.oid = a.attcollation) AS collation,'.$parts[1];
|
||||
}
|
||||
}
|
||||
88
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL92Platform.php
vendored
Normal file
88
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL92Platform.php
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
|
||||
/**
|
||||
* Provides the behavior, features and SQL dialect of the PostgreSQL 9.2 database platform.
|
||||
*
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.5
|
||||
*/
|
||||
class PostgreSQL92Platform extends PostgreSQL91Platform
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getJsonTypeDeclarationSQL(array $field)
|
||||
{
|
||||
return 'JSON';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSmallIntTypeDeclarationSQL(array $field)
|
||||
{
|
||||
if ( ! empty($field['autoincrement'])) {
|
||||
return 'SMALLSERIAL';
|
||||
}
|
||||
|
||||
return parent::getSmallIntTypeDeclarationSQL($field);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function hasNativeJsonType()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\PostgreSQL92Keywords::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function initializeDoctrineTypeMappings()
|
||||
{
|
||||
parent::initializeDoctrineTypeMappings();
|
||||
|
||||
$this->doctrineTypeMapping['json'] = Type::JSON;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCloseActiveDatabaseConnectionsSQL($database)
|
||||
{
|
||||
$database = $this->quoteStringLiteral($database);
|
||||
|
||||
return "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = $database";
|
||||
}
|
||||
}
|
||||
62
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php
vendored
Normal file
62
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
|
||||
/**
|
||||
* Provides the behavior, features and SQL dialect of the PostgreSQL 9.4 database platform.
|
||||
*
|
||||
* @author Matteo Beccati <matteo@beccati.com>
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.6
|
||||
*/
|
||||
class PostgreSQL94Platform extends PostgreSQL92Platform
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getJsonTypeDeclarationSQL(array $field)
|
||||
{
|
||||
if (!empty($field['jsonb'])) {
|
||||
return 'JSONB';
|
||||
}
|
||||
|
||||
return 'JSON';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\PostgreSQL94Keywords::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function initializeDoctrineTypeMappings()
|
||||
{
|
||||
parent::initializeDoctrineTypeMappings();
|
||||
|
||||
$this->doctrineTypeMapping['jsonb'] = Type::JSON;
|
||||
}
|
||||
}
|
||||
1257
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
vendored
Normal file
1257
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
47
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere11Platform.php
vendored
Normal file
47
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere11Platform.php
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
/**
|
||||
* The SQLAnywhere11Platform provides the behavior, features and SQL dialect of the
|
||||
* SAP Sybase SQL Anywhere 11 database platform.
|
||||
*
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.5
|
||||
*/
|
||||
class SQLAnywhere11Platform extends SQLAnywherePlatform
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getRegexpExpression()
|
||||
{
|
||||
return 'REGEXP';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\SQLAnywhere11Keywords::class;
|
||||
}
|
||||
}
|
||||
135
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere12Platform.php
vendored
Normal file
135
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere12Platform.php
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
use Doctrine\DBAL\Schema\Index;
|
||||
use Doctrine\DBAL\Schema\Sequence;
|
||||
|
||||
/**
|
||||
* The SQLAnywhere12Platform provides the behavior, features and SQL dialect of the
|
||||
* SAP Sybase SQL Anywhere 12 database platform.
|
||||
*
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.5
|
||||
*/
|
||||
class SQLAnywhere12Platform extends SQLAnywhere11Platform
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCreateSequenceSQL(Sequence $sequence)
|
||||
{
|
||||
return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) .
|
||||
' INCREMENT BY ' . $sequence->getAllocationSize() .
|
||||
' START WITH ' . $sequence->getInitialValue() .
|
||||
' MINVALUE ' . $sequence->getInitialValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getAlterSequenceSQL(Sequence $sequence)
|
||||
{
|
||||
return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) .
|
||||
' INCREMENT BY ' . $sequence->getAllocationSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getDateTimeTzFormatString()
|
||||
{
|
||||
return 'Y-m-d H:i:s.uP';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration)
|
||||
{
|
||||
return 'TIMESTAMP WITH TIME ZONE';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getDropSequenceSQL($sequence)
|
||||
{
|
||||
if ($sequence instanceof Sequence) {
|
||||
$sequence = $sequence->getQuotedName($this);
|
||||
}
|
||||
|
||||
return 'DROP SEQUENCE ' . $sequence;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getListSequencesSQL($database)
|
||||
{
|
||||
return 'SELECT sequence_name, increment_by, start_with, min_value FROM SYS.SYSSEQUENCE';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSequenceNextValSQL($sequenceName)
|
||||
{
|
||||
return 'SELECT ' . $sequenceName . '.NEXTVAL';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supportsSequences()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getAdvancedIndexOptionsSQL(Index $index)
|
||||
{
|
||||
if ( ! $index->isPrimary() && $index->isUnique() && $index->hasFlag('with_nulls_not_distinct')) {
|
||||
return ' WITH NULLS NOT DISTINCT' . parent::getAdvancedIndexOptionsSQL($index);
|
||||
}
|
||||
|
||||
return parent::getAdvancedIndexOptionsSQL($index);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\SQLAnywhere12Keywords::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function initializeDoctrineTypeMappings()
|
||||
{
|
||||
parent::initializeDoctrineTypeMappings();
|
||||
$this->doctrineTypeMapping['timestamp with time zone'] = 'datetime';
|
||||
}
|
||||
}
|
||||
60
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere16Platform.php
vendored
Normal file
60
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywhere16Platform.php
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
use Doctrine\DBAL\Schema\Index;
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* The SQLAnywhere16Platform provides the behavior, features and SQL dialect of the
|
||||
* SAP Sybase SQL Anywhere 16 database platform.
|
||||
*
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.5
|
||||
*/
|
||||
class SQLAnywhere16Platform extends SQLAnywhere12Platform
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getAdvancedIndexOptionsSQL(Index $index)
|
||||
{
|
||||
if ($index->hasFlag('with_nulls_distinct') && $index->hasFlag('with_nulls_not_distinct')) {
|
||||
throw new UnexpectedValueException(
|
||||
'An Index can either have a "with_nulls_distinct" or "with_nulls_not_distinct" flag but not both.'
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! $index->isPrimary() && $index->isUnique() && $index->hasFlag('with_nulls_distinct')) {
|
||||
return ' WITH NULLS DISTINCT' . parent::getAdvancedIndexOptionsSQL($index);
|
||||
}
|
||||
|
||||
return parent::getAdvancedIndexOptionsSQL($index);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\SQLAnywhere16Keywords::class;
|
||||
}
|
||||
}
|
||||
1509
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php
vendored
Normal file
1509
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
50
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAzurePlatform.php
vendored
Normal file
50
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAzurePlatform.php
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
use Doctrine\DBAL\Schema\Table;
|
||||
|
||||
/**
|
||||
* Platform to ensure compatibility of Doctrine with SQL Azure
|
||||
*
|
||||
* On top of SQL Server 2008 the following functionality is added:
|
||||
*
|
||||
* - Create tables with the FEDERATED ON syntax.
|
||||
*/
|
||||
class SQLAzurePlatform extends SQLServer2008Platform
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getCreateTableSQL(Table $table, $createFlags=self::CREATE_INDEXES)
|
||||
{
|
||||
$sql = parent::getCreateTableSQL($table, $createFlags);
|
||||
|
||||
if ($table->hasOption('azure.federatedOnColumnName')) {
|
||||
$distributionName = $table->getOption('azure.federatedOnDistributionName');
|
||||
$columnName = $table->getOption('azure.federatedOnColumnName');
|
||||
$stmt = ' FEDERATED ON (' . $distributionName . ' = ' . $columnName . ')';
|
||||
|
||||
$sql[0] = $sql[0] . $stmt;
|
||||
}
|
||||
|
||||
return $sql;
|
||||
}
|
||||
}
|
||||
63
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php
vendored
Normal file
63
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
/**
|
||||
* Platform to ensure compatibility of Doctrine with Microsoft SQL Server 2005 version and
|
||||
* higher.
|
||||
*
|
||||
* Differences to SQL Server 2008 are:
|
||||
*
|
||||
* - DATETIME2 datatype does not exist, only DATETIME which has a precision of
|
||||
* 3. This is not supported by PHP DateTime, so we are emulating it by
|
||||
* setting .000 manually.
|
||||
* - Starting with SQLServer2005 VARCHAR(MAX), VARBINARY(MAX) and
|
||||
* NVARCHAR(max) replace the old TEXT, NTEXT and IMAGE types. See
|
||||
* {@link http://www.sql-server-helper.com/faq/sql-server-2005-varchar-max-p01.aspx}
|
||||
* for more information.
|
||||
*/
|
||||
class SQLServer2005Platform extends SQLServerPlatform
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function supportsLimitOffset()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getClobTypeDeclarationSQL(array $field)
|
||||
{
|
||||
return 'VARCHAR(MAX)';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* Returns Microsoft SQL Server 2005 specific keywords class
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\SQLServer2005Keywords::class;
|
||||
}
|
||||
}
|
||||
134
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php
vendored
Normal file
134
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
/**
|
||||
* Platform to ensure compatibility of Doctrine with Microsoft SQL Server 2008 version.
|
||||
*
|
||||
* Differences to SQL Server 2005 and before are that a new DATETIME2 type was
|
||||
* introduced that has a higher precision.
|
||||
*/
|
||||
class SQLServer2008Platform extends SQLServer2005Platform
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getListTablesSQL()
|
||||
{
|
||||
// "sysdiagrams" table must be ignored as it's internal SQL Server table for Database Diagrams
|
||||
// Category 2 must be ignored as it is "MS SQL Server 'pseudo-system' object[s]" for replication
|
||||
return "SELECT name, SCHEMA_NAME (uid) AS schema_name FROM sysobjects WHERE type = 'U' AND name != 'sysdiagrams' AND category != 2 ORDER BY name";
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration)
|
||||
{
|
||||
// 3 - microseconds precision length
|
||||
// http://msdn.microsoft.com/en-us/library/ms187819.aspx
|
||||
return 'DATETIME2(6)';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDateTypeDeclarationSQL(array $fieldDeclaration)
|
||||
{
|
||||
return 'DATE';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
|
||||
{
|
||||
return 'TIME(0)';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration)
|
||||
{
|
||||
return 'DATETIMEOFFSET(6)';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDateTimeFormatString()
|
||||
{
|
||||
return 'Y-m-d H:i:s.u';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDateTimeTzFormatString()
|
||||
{
|
||||
return 'Y-m-d H:i:s.u P';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getDateFormatString()
|
||||
{
|
||||
return 'Y-m-d';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getTimeFormatString()
|
||||
{
|
||||
return 'H:i:s';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* Adding Datetime2 Type
|
||||
*/
|
||||
protected function initializeDoctrineTypeMappings()
|
||||
{
|
||||
parent::initializeDoctrineTypeMappings();
|
||||
$this->doctrineTypeMapping['datetime2'] = 'datetime';
|
||||
$this->doctrineTypeMapping['date'] = 'date';
|
||||
$this->doctrineTypeMapping['time'] = 'time';
|
||||
$this->doctrineTypeMapping['datetimeoffset'] = 'datetimetz';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* Returns Microsoft SQL Server 2008 specific keywords class
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\SQLServer2008Keywords::class;
|
||||
}
|
||||
|
||||
protected function getLikeWildcardCharacters() : string
|
||||
{
|
||||
return parent::getLikeWildcardCharacters() . '[]^';
|
||||
}
|
||||
}
|
||||
162
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php
vendored
Normal file
162
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
use Doctrine\DBAL\Schema\Sequence;
|
||||
use const PREG_OFFSET_CAPTURE;
|
||||
use function preg_match;
|
||||
use function preg_match_all;
|
||||
use function substr_count;
|
||||
|
||||
/**
|
||||
* Platform to ensure compatibility of Doctrine with Microsoft SQL Server 2012 version.
|
||||
*
|
||||
* Differences to SQL Server 2008 and before are that sequences are introduced,
|
||||
* and support for the new OFFSET... FETCH syntax for result pagination has been added.
|
||||
*
|
||||
* @author Steve Müller <st.mueller@dzh-online.de>
|
||||
*/
|
||||
class SQLServer2012Platform extends SQLServer2008Platform
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getAlterSequenceSQL(Sequence $sequence)
|
||||
{
|
||||
return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) .
|
||||
' INCREMENT BY ' . $sequence->getAllocationSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCreateSequenceSQL(Sequence $sequence)
|
||||
{
|
||||
return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) .
|
||||
' START WITH ' . $sequence->getInitialValue() .
|
||||
' INCREMENT BY ' . $sequence->getAllocationSize() .
|
||||
' MINVALUE ' . $sequence->getInitialValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getDropSequenceSQL($sequence)
|
||||
{
|
||||
if ($sequence instanceof Sequence) {
|
||||
$sequence = $sequence->getQuotedName($this);
|
||||
}
|
||||
|
||||
return 'DROP SEQUENCE ' . $sequence;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getListSequencesSQL($database)
|
||||
{
|
||||
return 'SELECT seq.name,
|
||||
CAST(
|
||||
seq.increment AS VARCHAR(MAX)
|
||||
) AS increment, -- CAST avoids driver error for sql_variant type
|
||||
CAST(
|
||||
seq.start_value AS VARCHAR(MAX)
|
||||
) AS start_value -- CAST avoids driver error for sql_variant type
|
||||
FROM sys.sequences AS seq';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSequenceNextValSQL($sequenceName)
|
||||
{
|
||||
return 'SELECT NEXT VALUE FOR ' . $sequenceName;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supportsSequences()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* Returns Microsoft SQL Server 2012 specific keywords class
|
||||
*/
|
||||
protected function getReservedKeywordsClass()
|
||||
{
|
||||
return Keywords\SQLServer2012Keywords::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function doModifyLimitQuery($query, $limit, $offset = null)
|
||||
{
|
||||
if ($limit === null && $offset <= 0) {
|
||||
return $query;
|
||||
}
|
||||
|
||||
// Queries using OFFSET... FETCH MUST have an ORDER BY clause
|
||||
// Find the position of the last instance of ORDER BY and ensure it is not within a parenthetical statement
|
||||
// but can be in a newline
|
||||
$matches = [];
|
||||
$matchesCount = preg_match_all("/[\\s]+order\\s+by\\s/im", $query, $matches, PREG_OFFSET_CAPTURE);
|
||||
$orderByPos = false;
|
||||
if ($matchesCount > 0) {
|
||||
$orderByPos = $matches[0][($matchesCount - 1)][1];
|
||||
}
|
||||
|
||||
if ($orderByPos === false
|
||||
|| substr_count($query, "(", $orderByPos) - substr_count($query, ")", $orderByPos)
|
||||
) {
|
||||
if (preg_match('/^SELECT\s+DISTINCT/im', $query)) {
|
||||
// SQL Server won't let us order by a non-selected column in a DISTINCT query,
|
||||
// so we have to do this madness. This says, order by the first column in the
|
||||
// result. SQL Server's docs say that a nonordered query's result order is non-
|
||||
// deterministic anyway, so this won't do anything that a bunch of update and
|
||||
// deletes to the table wouldn't do anyway.
|
||||
$query .= " ORDER BY 1";
|
||||
} else {
|
||||
// In another DBMS, we could do ORDER BY 0, but SQL Server gets angry if you
|
||||
// use constant expressions in the order by list.
|
||||
$query .= " ORDER BY (SELECT 0)";
|
||||
}
|
||||
}
|
||||
|
||||
if ($offset === null) {
|
||||
$offset = 0;
|
||||
}
|
||||
|
||||
// This looks somewhat like MYSQL, but limit/offset are in inverse positions
|
||||
// Supposedly SQL:2008 core standard.
|
||||
// Per TSQL spec, FETCH NEXT n ROWS ONLY is not valid without OFFSET n ROWS.
|
||||
$query .= " OFFSET " . (int) $offset . " ROWS";
|
||||
|
||||
if ($limit !== null) {
|
||||
$query .= " FETCH NEXT " . (int) $limit . " ROWS ONLY";
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
1684
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
vendored
Normal file
1684
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1175
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php
vendored
Normal file
1175
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
20
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/TrimMode.php
vendored
Normal file
20
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/TrimMode.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\DBAL\Platforms;
|
||||
|
||||
final class TrimMode
|
||||
{
|
||||
public const UNSPECIFIED = 0;
|
||||
|
||||
public const LEADING = 1;
|
||||
|
||||
public const TRAILING = 2;
|
||||
|
||||
public const BOTH = 3;
|
||||
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user