PHP Class Doctrine\DBAL\Platforms\SQLAnywherePlatform

Since: 2.5
Author: Steve Müller ([email protected])
Inheritance: extends Doctrine\DBAL\Platforms\AbstractPlatform
Show file Open project: doctrine/dbal Class Usage Examples

Public Methods

Method Description
appendLockHint ( $fromClause, $lockMode )
fixSchemaElementName ( $schemaElementName )
getAdvancedForeignKeyOptionsSQL ( Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey )
getAlterTableSQL ( Doctrine\DBAL\Schema\TableDiff $diff )
getBigIntTypeDeclarationSQL ( array $columnDef )
getBinaryDefaultLength ( )
getBinaryMaxLength ( )
getBlobTypeDeclarationSQL ( array $field )
getBooleanTypeDeclarationSQL ( array $columnDef )
getClobTypeDeclarationSQL ( array $field )
getCommentOnColumnSQL ( $tableName, $columnName, $comment )
getConcatExpression ( )
getCreateConstraintSQL ( Doctrine\DBAL\Schema\Constraint $constraint, $table )
getCreateDatabaseSQL ( $database )
getCreateIndexSQL ( Doctrine\DBAL\Schema\Index $index, $table )
getCreatePrimaryKeySQL ( Doctrine\DBAL\Schema\Index $index, $table )
getCreateTemporaryTableSnippetSQL ( )
getCreateViewSQL ( $name, $sql )
getCurrentDateSQL ( )
getCurrentTimeSQL ( )
getCurrentTimestampSQL ( )
getDateDiffExpression ( $date1, $date2 )
getDateTimeFormatString ( )
getDateTimeTypeDeclarationSQL ( array $fieldDeclaration )
getDateTimeTzFormatString ( )
getDateTypeDeclarationSQL ( array $fieldDeclaration )
getDefaultTransactionIsolationLevel ( )
getDropDatabaseSQL ( $database )
getDropIndexSQL ( $index, $table = null )
getDropViewSQL ( $name )
getForUpdateSQL ( )
getForeignKeyBaseDeclarationSQL ( Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey )
getForeignKeyMatchClauseSQL ( integer $type ) : string Returns foreign key MATCH clause for given type.
getForeignKeyReferentialActionSQL ( $action )
getGuidExpression ( )
getGuidTypeDeclarationSQL ( array $field )
getIndexDeclarationSQL ( $name, Doctrine\DBAL\Schema\Index $index )
getIntegerTypeDeclarationSQL ( array $columnDef )
getListDatabasesSQL ( )
getListTableColumnsSQL ( $table, $database = null )
getListTableConstraintsSQL ( $table )
getListTableForeignKeysSQL ( $table )
getListTableIndexesSQL ( $table, $currentDatabase = null )
getListTablesSQL ( )
getListUsersSQL ( )
getListViewsSQL ( $database )
getLocateExpression ( $str, $substr, $startPos = false )
getMaxIdentifierLength ( )
getMd5Expression ( $column )
getName ( )
getPrimaryKeyDeclarationSQL ( Doctrine\DBAL\Schema\Index $index, string $name = null ) : string Obtain DBMS specific SQL code portion needed to set a primary key declaration to be used in statements like ALTER TABLE.
getSetTransactionIsolationSQL ( $level )
getSmallIntTypeDeclarationSQL ( array $columnDef )
getStartDatabaseSQL ( string $database ) : string Returns the SQL statement for starting an existing database.
getStopDatabaseSQL ( string $database ) : string Returns the SQL statement for stopping a running database.
getSubstringExpression ( $value, $from, $length = null )
getTemporaryTableSQL ( )
getTimeFormatString ( )
getTimeTypeDeclarationSQL ( array $fieldDeclaration )
getTrimExpression ( $str, $pos = self::TRIM_UNSPECIFIED, $char = false )
getTruncateTableSQL ( $tableName, $cascade = false )
getUniqueConstraintDeclarationSQL ( $name, Doctrine\DBAL\Schema\Index $index )
getVarcharDefaultLength ( )
getVarcharMaxLength ( )
hasNativeGuidType ( )
prefersIdentityColumns ( )
supportsCommentOnStatement ( )
supportsIdentityColumns ( )

Protected Methods

Method Description
_getCommonIntegerTypeDeclarationSQL ( array $columnDef )
_getCreateTableSQL ( $tableName, array $columns, array $options = [] )
_getTransactionIsolationLevelSQL ( $level )
doModifyLimitQuery ( $query, $limit, $offset )
getAdvancedIndexOptionsSQL ( Doctrine\DBAL\Schema\Index $index ) : string Return the INDEX query section dealing with non-standard SQL Anywhere options.
getAlterTableAddColumnClause ( Doctrine\DBAL\Schema\Column $column ) : string Returns the SQL clause for creating a column in a table alteration.
getAlterTableChangeColumnClause ( Doctrine\DBAL\Schema\ColumnDiff $columnDiff ) : string | null Returns the SQL clause for altering a column in a table alteration.
getAlterTableClause ( Doctrine\DBAL\Schema\Identifier $tableName ) : string Returns the SQL clause for altering a table.
getAlterTableRemoveColumnClause ( Doctrine\DBAL\Schema\Column $column ) : string Returns the SQL clause for dropping a column in a table alteration.
getAlterTableRenameColumnClause ( string $oldColumnName, Doctrine\DBAL\Schema\Column $column ) : string Returns the SQL clause for renaming a column in a table alteration.
getAlterTableRenameTableClause ( Doctrine\DBAL\Schema\Identifier $newTableName ) : string Returns the SQL clause for renaming a table in a table alteration.
getBinaryTypeDeclarationSQLSnippet ( $length, $fixed )
getCreateIndexSQLFlags ( Doctrine\DBAL\Schema\Index $index )
getDateArithmeticIntervalExpression ( $date, $operator, $interval, $unit )
getRenameIndexSQL ( $oldIndexName, Doctrine\DBAL\Schema\Index $index, $tableName )
getReservedKeywordsClass ( )
getTableConstraintDeclarationSQL ( Doctrine\DBAL\Schema\Constraint $constraint, string | null $name = null ) : string Returns the SQL snippet for creating a table constraint.
getVarcharTypeDeclarationSQLSnippet ( $length, $fixed )
initializeDoctrineTypeMappings ( )

Method Details

_getCommonIntegerTypeDeclarationSQL() protected method

protected _getCommonIntegerTypeDeclarationSQL ( array $columnDef )
$columnDef array

_getCreateTableSQL() protected method

protected _getCreateTableSQL ( $tableName, array $columns, array $options = [] )
$columns array
$options array

_getTransactionIsolationLevelSQL() protected method

protected _getTransactionIsolationLevelSQL ( $level )

appendLockHint() public method

public appendLockHint ( $fromClause, $lockMode )

doModifyLimitQuery() protected method

protected doModifyLimitQuery ( $query, $limit, $offset )

fixSchemaElementName() public method

SQL Anywhere supports a maximum length of 128 bytes for identifiers.
public fixSchemaElementName ( $schemaElementName )

getAdvancedForeignKeyOptionsSQL() public method

public getAdvancedForeignKeyOptionsSQL ( Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey )
$foreignKey Doctrine\DBAL\Schema\ForeignKeyConstraint

getAdvancedIndexOptionsSQL() protected method

Return the INDEX query section dealing with non-standard SQL Anywhere options.
protected getAdvancedIndexOptionsSQL ( Doctrine\DBAL\Schema\Index $index ) : string
$index Doctrine\DBAL\Schema\Index Index definition
return string

getAlterTableAddColumnClause() protected method

Returns the SQL clause for creating a column in a table alteration.
protected getAlterTableAddColumnClause ( Doctrine\DBAL\Schema\Column $column ) : string
$column Doctrine\DBAL\Schema\Column The column to add.
return string

getAlterTableChangeColumnClause() protected method

This method returns null in case that only the column comment has changed. Changes in column comments have to be handled differently.
protected getAlterTableChangeColumnClause ( Doctrine\DBAL\Schema\ColumnDiff $columnDiff ) : string | null
$columnDiff Doctrine\DBAL\Schema\ColumnDiff The diff of the column to alter.
return string | null

getAlterTableClause() protected method

Returns the SQL clause for altering a table.
protected getAlterTableClause ( Doctrine\DBAL\Schema\Identifier $tableName ) : string
$tableName Doctrine\DBAL\Schema\Identifier The quoted name of the table to alter.
return string

getAlterTableRemoveColumnClause() protected method

Returns the SQL clause for dropping a column in a table alteration.
protected getAlterTableRemoveColumnClause ( Doctrine\DBAL\Schema\Column $column ) : string
$column Doctrine\DBAL\Schema\Column The column to drop.
return string

getAlterTableRenameColumnClause() protected method

Returns the SQL clause for renaming a column in a table alteration.
protected getAlterTableRenameColumnClause ( string $oldColumnName, Doctrine\DBAL\Schema\Column $column ) : string
$oldColumnName string The quoted name of the column to rename.
$column Doctrine\DBAL\Schema\Column The column to rename to.
return string

getAlterTableRenameTableClause() protected method

Returns the SQL clause for renaming a table in a table alteration.
protected getAlterTableRenameTableClause ( Doctrine\DBAL\Schema\Identifier $newTableName ) : string
$newTableName Doctrine\DBAL\Schema\Identifier The quoted name of the table to rename to.
return string

getAlterTableSQL() public method

public getAlterTableSQL ( Doctrine\DBAL\Schema\TableDiff $diff )
$diff Doctrine\DBAL\Schema\TableDiff

getBigIntTypeDeclarationSQL() public method

public getBigIntTypeDeclarationSQL ( array $columnDef )
$columnDef array

getBinaryDefaultLength() public method

getBinaryMaxLength() public method

public getBinaryMaxLength ( )

getBinaryTypeDeclarationSQLSnippet() protected method

protected getBinaryTypeDeclarationSQLSnippet ( $length, $fixed )

getBlobTypeDeclarationSQL() public method

public getBlobTypeDeclarationSQL ( array $field )
$field array

getBooleanTypeDeclarationSQL() public method

BIT type columns require an explicit NULL declaration in SQL Anywhere if they shall be nullable. Otherwise by just omitting the NOT NULL clause, SQL Anywhere will declare them NOT NULL nonetheless.
public getBooleanTypeDeclarationSQL ( array $columnDef )
$columnDef array

getClobTypeDeclarationSQL() public method

public getClobTypeDeclarationSQL ( array $field )
$field array

getCommentOnColumnSQL() public method

public getCommentOnColumnSQL ( $tableName, $columnName, $comment )

getConcatExpression() public method

public getConcatExpression ( )

getCreateConstraintSQL() public method

public getCreateConstraintSQL ( Doctrine\DBAL\Schema\Constraint $constraint, $table )
$constraint Doctrine\DBAL\Schema\Constraint

getCreateDatabaseSQL() public method

public getCreateDatabaseSQL ( $database )

getCreateIndexSQL() public method

Appends SQL Anywhere specific flags if given.
public getCreateIndexSQL ( Doctrine\DBAL\Schema\Index $index, $table )
$index Doctrine\DBAL\Schema\Index

getCreateIndexSQLFlags() protected method

protected getCreateIndexSQLFlags ( Doctrine\DBAL\Schema\Index $index )
$index Doctrine\DBAL\Schema\Index

getCreatePrimaryKeySQL() public method

public getCreatePrimaryKeySQL ( Doctrine\DBAL\Schema\Index $index, $table )
$index Doctrine\DBAL\Schema\Index

getCreateTemporaryTableSnippetSQL() public method

getCreateViewSQL() public method

public getCreateViewSQL ( $name, $sql )

getCurrentDateSQL() public method

public getCurrentDateSQL ( )

getCurrentTimeSQL() public method

public getCurrentTimeSQL ( )

getCurrentTimestampSQL() public method

getDateArithmeticIntervalExpression() protected method

protected getDateArithmeticIntervalExpression ( $date, $operator, $interval, $unit )

getDateDiffExpression() public method

public getDateDiffExpression ( $date1, $date2 )

getDateTimeFormatString() public method

getDateTimeTypeDeclarationSQL() public method

public getDateTimeTypeDeclarationSQL ( array $fieldDeclaration )
$fieldDeclaration array

getDateTimeTzFormatString() public method

getDateTypeDeclarationSQL() public method

public getDateTypeDeclarationSQL ( array $fieldDeclaration )
$fieldDeclaration array

getDefaultTransactionIsolationLevel() public method

getDropDatabaseSQL() public method

public getDropDatabaseSQL ( $database )

getDropIndexSQL() public method

public getDropIndexSQL ( $index, $table = null )

getDropViewSQL() public method

public getDropViewSQL ( $name )

getForUpdateSQL() public method

public getForUpdateSQL ( )

getForeignKeyBaseDeclarationSQL() public method

public getForeignKeyBaseDeclarationSQL ( Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey )
$foreignKey Doctrine\DBAL\Schema\ForeignKeyConstraint

getForeignKeyMatchClauseSQL() public method

Returns foreign key MATCH clause for given type.
public getForeignKeyMatchClauseSQL ( integer $type ) : string
$type integer The foreign key match type
return string

getForeignKeyReferentialActionSQL() public method

getGuidExpression() public method

public getGuidExpression ( )

getGuidTypeDeclarationSQL() public method

public getGuidTypeDeclarationSQL ( array $field )
$field array

getIndexDeclarationSQL() public method

public getIndexDeclarationSQL ( $name, Doctrine\DBAL\Schema\Index $index )
$index Doctrine\DBAL\Schema\Index

getIntegerTypeDeclarationSQL() public method

public getIntegerTypeDeclarationSQL ( array $columnDef )
$columnDef array

getListDatabasesSQL() public method

public getListDatabasesSQL ( )

getListTableColumnsSQL() public method

public getListTableColumnsSQL ( $table, $database = null )

getListTableConstraintsSQL() public method

public getListTableConstraintsSQL ( $table )

getListTableForeignKeysSQL() public method

public getListTableForeignKeysSQL ( $table )

getListTableIndexesSQL() public method

public getListTableIndexesSQL ( $table, $currentDatabase = null )

getListTablesSQL() public method

public getListTablesSQL ( )

getListUsersSQL() public method

public getListUsersSQL ( )

getListViewsSQL() public method

public getListViewsSQL ( $database )

getLocateExpression() public method

public getLocateExpression ( $str, $substr, $startPos = false )

getMaxIdentifierLength() public method

getMd5Expression() public method

public getMd5Expression ( $column )

getName() public method

public getName ( )

getPrimaryKeyDeclarationSQL() public method

Obtain DBMS specific SQL code portion needed to set a primary key declaration to be used in statements like ALTER TABLE.
public getPrimaryKeyDeclarationSQL ( Doctrine\DBAL\Schema\Index $index, string $name = null ) : string
$index Doctrine\DBAL\Schema\Index Index definition
$name string Name of the primary key
return string DBMS specific SQL code portion needed to set a primary key

getRenameIndexSQL() protected method

protected getRenameIndexSQL ( $oldIndexName, Doctrine\DBAL\Schema\Index $index, $tableName )
$index Doctrine\DBAL\Schema\Index

getReservedKeywordsClass() protected method

protected getReservedKeywordsClass ( )

getSetTransactionIsolationSQL() public method

public getSetTransactionIsolationSQL ( $level )

getSmallIntTypeDeclarationSQL() public method

public getSmallIntTypeDeclarationSQL ( array $columnDef )
$columnDef array

getStartDatabaseSQL() public method

In SQL Anywhere you can start and stop databases on a database server instance. This is a required statement after having created a new database as it has to be explicitly started to be usable. SQL Anywhere does not automatically start a database after creation!
public getStartDatabaseSQL ( string $database ) : string
$database string Name of the database to start.
return string

getStopDatabaseSQL() public method

In SQL Anywhere you can start and stop databases on a database server instance. This is a required statement before dropping an existing database as it has to be explicitly stopped before it can be dropped.
public getStopDatabaseSQL ( string $database ) : string
$database string Name of the database to stop.
return string

getSubstringExpression() public method

public getSubstringExpression ( $value, $from, $length = null )

getTableConstraintDeclarationSQL() protected method

Returns the SQL snippet for creating a table constraint.
protected getTableConstraintDeclarationSQL ( Doctrine\DBAL\Schema\Constraint $constraint, string | null $name = null ) : string
$constraint Doctrine\DBAL\Schema\Constraint The table constraint to create the SQL snippet for.
$name string | null The table constraint name to use if any.
return string

getTemporaryTableSQL() public method

getTimeFormatString() public method

public getTimeFormatString ( )

getTimeTypeDeclarationSQL() public method

public getTimeTypeDeclarationSQL ( array $fieldDeclaration )
$fieldDeclaration array

getTrimExpression() public method

public getTrimExpression ( $str, $pos = self::TRIM_UNSPECIFIED, $char = false )

getTruncateTableSQL() public method

public getTruncateTableSQL ( $tableName, $cascade = false )

getUniqueConstraintDeclarationSQL() public method

public getUniqueConstraintDeclarationSQL ( $name, Doctrine\DBAL\Schema\Index $index )
$index Doctrine\DBAL\Schema\Index

getVarcharDefaultLength() public method

getVarcharMaxLength() public method

public getVarcharMaxLength ( )

getVarcharTypeDeclarationSQLSnippet() protected method

protected getVarcharTypeDeclarationSQLSnippet ( $length, $fixed )

hasNativeGuidType() public method

public hasNativeGuidType ( )

initializeDoctrineTypeMappings() protected method

prefersIdentityColumns() public method

supportsCommentOnStatement() public method

supportsIdentityColumns() public method