MySQLPlatform
extends AbstractMySQLPlatform
in package
Provides the behavior, features and SQL dialect of the Oracle MySQL database platform of the oldest supported version.
Table of Contents
Constants
- CREATE_FOREIGNKEYS = 2
- CREATE_INDEXES = 1
- LENGTH_LIMIT_BLOB = 65535
- LENGTH_LIMIT_MEDIUMBLOB = 16777215
- LENGTH_LIMIT_MEDIUMTEXT = 16777215
- LENGTH_LIMIT_TEXT = 65535
- LENGTH_LIMIT_TINYBLOB = 255
- LENGTH_LIMIT_TINYTEXT = 255
Properties
- $_eventManager : EventManager|null
- $_keywords : KeywordList|null
- Holds the KeywordList instance for the current platform.
- $doctrineTypeComments : array<string|int, string>|null
- Contains a list of all columns that should generate parseable column comments for type-detection in reverse engineering scenarios.
- $doctrineTypeMapping : array<string|int, string>|null
Methods
- appendLockHint() : string
- Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.
- canEmulateSchemas() : bool
- Whether this platform can emulate schemas.
- columnsEqual() : bool
- Compares the definitions of the given columns in the context of this platform.
- convertBooleans() : mixed
- Some platforms need the boolean values to be converted.
- convertBooleansToDatabaseValue() : mixed
- This method should handle the prepared statements case. When there is no distinction, it's OK to use the same method.
- convertFromBoolean() : mixed
- Some platforms have boolean literals that needs to be correctly converted
- createSavePoint() : string
- Returns the SQL to create a new savepoint.
- createSchemaManager() : AbstractSchemaManager
- Creates the schema manager that can be used to inspect and change the underlying database schema according to the dialect of the platform.
- escapeStringForLike() : string
- Escapes metacharacters in a string intended to be used with a LIKE operator.
- getAcosExpression() : string
- Returns the SQL to get the arccosine of a value.
- getAdvancedForeignKeyOptionsSQL() : string
- Returns the FOREIGN KEY query section dealing with non-standard options as MATCH, INITIALLY DEFERRED, ON UPDATE, .
- getAlterSchemaSQL() : array<int, string>
- Generates SQL statements that can be used to apply the diff.
- getAlterSequenceSQL() : string
- Returns the SQL to change a sequence on this platform.
- getAlterTableSQL() : array<int, string>
- Gets the SQL statements for altering an existing table.
- getAsciiStringTypeDeclarationSQL() : string
- Returns the SQL snippet used to declare a column that can store characters in the ASCII character set
- getAvgExpression() : string
- Returns the SQL snippet to get the average value of a column.
- getBetweenExpression() : string
- Returns the SQL that checks if an expression evaluates to a value between two values.
- getBigIntTypeDeclarationSQL() : string
- Returns the SQL snippet that declares an 8 byte integer column.
- getBinaryDefaultLength() : int
- Gets the default length of a binary column.
- getBinaryMaxLength() : int
- Gets the maximum length of a binary column.
- getBinaryTypeDeclarationSQL() : string
- Returns the SQL snippet used to declare a BINARY/VARBINARY column type.
- getBitAndComparisonExpression() : string
- Returns the SQL bit AND comparison expression.
- getBitOrComparisonExpression() : string
- Returns the SQL bit OR comparison expression.
- getBlobTypeDeclarationSQL() : string
- Returns the SQL Snippet used to declare a BLOB column type.
- getBooleanTypeDeclarationSQL() : string
- Returns the SQL snippet that declares a boolean column.
- getCharMaxLength() : int
- Gets the maximum length of a char column.
- getCheckDeclarationSQL() : string
- Obtains DBMS specific SQL code portion needed to set a CHECK constraint declaration to be used in statements like CREATE TABLE.
- getClobTypeDeclarationSQL() : string
- Returns the SQL snippet used to declare a CLOB column type.
- getColumnCharsetDeclarationSQL() : string
- Obtains DBMS specific SQL code portion needed to set the CHARACTER SET of a column declaration to be used in statements like CREATE TABLE.
- getColumnCollationDeclarationSQL() : string
- Obtains DBMS specific SQL code portion needed to set the COLLATION of a column declaration to be used in statements like CREATE TABLE.
- getColumnDeclarationListSQL() : string
- Gets declaration of a number of columns in bulk.
- getColumnDeclarationSQL() : string
- Obtains DBMS specific SQL code portion needed to declare a generic type column to be used in statements like CREATE TABLE.
- getColumnsFieldDeclarationListSQL() : string
- Obtains DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE.
- getCommentOnColumnSQL() : string
- getConcatExpression() : string
- Returns a SQL snippet to concatenate the given expressions.
- getCosExpression() : string
- Returns the SQL to get the cosine of a value.
- getCountExpression() : string
- Returns the SQL snippet to get the number of rows (without a NULL value) of a column.
- getCreateConstraintSQL() : string
- Returns the SQL to create a constraint on a table on this platform.
- getCreateDatabaseSQL() : string
- Returns the SQL to create a new database.
- getCreateForeignKeySQL() : string
- Returns the SQL to create a new foreign key.
- getCreateIndexSQL() : string
- Returns the SQL to create an index on a table on this platform.
- getCreatePrimaryKeySQL() : string
- Returns the SQL to create an unnamed primary key constraint.
- getCreateSchemaSQL() : string
- Returns the SQL to create a named schema.
- getCreateSequenceSQL() : string
- Returns the SQL to create a sequence on this platform.
- getCreateTableSQL() : array<int, string>
- Returns the SQL statement(s) to create a table with the specified name, columns and constraints on this platform.
- getCreateTablesSQL() : array<int, string>
- getCreateTemporaryTableSnippetSQL() : string
- getCreateUniqueConstraintSQL() : string
- Returns the SQL to create a unique constraint on a table on this platform.
- getCreateViewSQL() : string
- getCurrentDatabaseExpression() : string
- Returns the SQL expression which represents the currently selected database.
- getCurrentDateSQL() : string
- Returns the SQL specific for the platform to get the current date.
- getCurrentTimeSQL() : string
- Returns the SQL specific for the platform to get the current time.
- getCurrentTimestampSQL() : string
- Returns the SQL specific for the platform to get the current timestamp
- getCustomTypeDeclarationSQL() : string
- Obtains SQL code portion needed to create a custom column, e.g. when a column has the "columnDefinition" keyword.
- getDateAddDaysExpression() : string
- Returns the SQL to add the number of given days to a date.
- getDateAddHourExpression() : string
- Returns the SQL to add the number of given hours to a date.
- getDateAddMinutesExpression() : string
- Returns the SQL to add the number of given minutes to a date.
- getDateAddMonthExpression() : string
- Returns the SQL to add the number of given months to a date.
- getDateAddQuartersExpression() : string
- Returns the SQL to add the number of given quarters to a date.
- getDateAddSecondsExpression() : string
- Returns the SQL to add the number of given seconds to a date.
- getDateAddWeeksExpression() : string
- Returns the SQL to add the number of given weeks to a date.
- getDateAddYearsExpression() : string
- Returns the SQL to add the number of given years to a date.
- getDateDiffExpression() : string
- Returns the SQL to calculate the difference in days between the two passed dates.
- getDateFormatString() : string
- Gets the format string, as accepted by the date() function, that describes the format of a stored date value of this platform.
- getDateSubDaysExpression() : string
- Returns the SQL to subtract the number of given days to a date.
- getDateSubHourExpression() : string
- Returns the SQL to subtract the number of given hours to a date.
- getDateSubMinutesExpression() : string
- Returns the SQL to subtract the number of given minutes from a date.
- getDateSubMonthExpression() : string
- Returns the SQL to subtract the number of given months to a date.
- getDateSubQuartersExpression() : string
- Returns the SQL to subtract the number of given quarters from a date.
- getDateSubSecondsExpression() : string
- Returns the SQL to subtract the number of given seconds from a date.
- getDateSubWeeksExpression() : string
- Returns the SQL to subtract the number of given weeks from a date.
- getDateSubYearsExpression() : string
- Returns the SQL to subtract the number of given years from a date.
- getDateTimeFormatString() : string
- Gets the format string, as accepted by the date() function, that describes the format of a stored datetime value of this platform.
- getDateTimeTypeDeclarationSQL() : string
- Obtains DBMS specific SQL to be used to create datetime columns in statements like CREATE TABLE.
- getDateTimeTzFormatString() : string
- Gets the format string, as accepted by the date() function, that describes the format of a stored datetime with timezone value of this platform.
- getDateTimeTzTypeDeclarationSQL() : string
- Obtains DBMS specific SQL to be used to create datetime with timezone offset columns.
- getDateTypeDeclarationSQL() : string
- Obtains DBMS specific SQL to be used to create date columns in statements like CREATE TABLE.
- getDecimalTypeDeclarationSQL() : string
- Returns the SQL snippet that declares a floating point column of arbitrary precision.
- getDefaultSchemaName() : string
- Returns the default schema name.
- getDefaultTransactionIsolationLevel() : TransactionIsolationLevel::*
- Gets the default transaction isolation level of the platform.
- getDefaultValueDeclarationSQL() : string
- Obtains DBMS specific SQL code portion needed to set a default value declaration to be used in statements like CREATE TABLE.
- getDoctrineTypeComment() : string
- Gets the comment to append to a column comment that helps parsing this type in reverse engineering.
- getDoctrineTypeMapping() : string
- Gets the Doctrine type that is mapped for the given database column type.
- getDropDatabaseSQL() : string
- Returns the SQL snippet to drop an existing database.
- getDropForeignKeySQL() : string
- Returns the SQL to drop a foreign key.
- getDropIndexSQL() : string
- Returns the SQL to drop an index from a table.
- getDropSchemaSQL() : string
- Returns the SQL snippet to drop a schema.
- getDropSequenceSQL() : string
- Returns the SQL snippet to drop an existing sequence.
- getDropTableSQL() : string
- Returns the SQL snippet to drop an existing table.
- getDropTablesSQL() : array<int, string>
- getDropTemporaryTableSQL() : string
- Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.
- getDropUniqueConstraintSQL() : string
- Returns the SQL to drop a unique constraint.
- getDropViewSQL() : string
- getDummySelectSQL() : string
- This is for test reasons, many vendors have special requirements for dummy statements.
- getEmptyIdentityInsertSQL() : string
- Returns the insert SQL for an empty insert statement.
- getEventManager() : EventManager|null
- Gets the EventManager used by the Platform.
- getFloatDeclarationSQL() : string
- getForeignKeyBaseDeclarationSQL() : string
- Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint of a column declaration to be used in statements like CREATE TABLE.
- getForeignKeyDeclarationSQL() : string
- Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint of a column declaration to be used in statements like CREATE TABLE.
- getForeignKeyReferentialActionSQL() : string
- Returns the given referential action in uppercase if valid, otherwise throws an exception.
- getForUpdateSQL() : string
- Returns the FOR UPDATE expression.
- getGuidTypeDeclarationSQL() : string
- Returns the SQL snippet to declare a GUID/UUID column.
- getIdentifierQuoteCharacter() : string
- Gets the character used for identifier quoting.
- getIdentitySequenceName() : string
- Returns the name of the sequence for a particular identity column in a particular table.
- getIndexDeclarationSQL() : string
- Obtains DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE.
- getIndexFieldDeclarationListSQL() : string
- Obtains DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE.
- getInlineColumnCommentSQL() : string
- Returns the SQL to create inline comment on a column.
- getIntegerTypeDeclarationSQL() : string
- Returns the SQL snippet that declares a 4 byte integer column.
- getIsNotNullExpression() : string
- Returns the SQL that checks if an expression is not null.
- getIsNullExpression() : string
- Returns the SQL that checks if an expression is null.
- getJsonTypeDeclarationSQL() : string
- Returns the SQL snippet to declare a JSON column.
- getLengthExpression() : string
- Returns the SQL snippet to get the length of a text column in characters.
- getListNamespacesSQL() : string
- Returns the SQL statement for retrieving the namespaces defined in the database.
- getListTableColumnsSQL() : string
- getListTableConstraintsSQL() : string
- getListTableForeignKeysSQL() : string
- getListTableIndexesSQL() : string
- getListTableMetadataSQL() : string
- getListTablesSQL() : string
- getListUsersSQL() : string
- getLocateExpression() : string
- Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.
- getLowerExpression() : string
- Returns the SQL snippet to change all characters from the expression to lowercase, according to the current character set mapping.
- getLtrimExpression() : string
- Returns the SQL snippet to trim leading space characters from the expression.
- getMaxExpression() : string
- Returns the SQL snippet to get the highest value of a column.
- getMaxIdentifierLength() : int
- Maximum length of any given database identifier, like tables or column names.
- getMd5Expression() : string
- Returns the SQL snippet to get the md5 sum of a column.
- getMinExpression() : string
- Returns the SQL snippet to get the lowest value of a column.
- getModExpression() : string
- Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.
- getName() : string
- Gets the name of the platform.
- getNotExpression() : string
- Returns the SQL for a logical not.
- getNowExpression() : string
- Returns the SQL snippet to get the current system date.
- getPiExpression() : string
- Returns the SQL to get the PI value.
- getReadLockSQL() : string
- Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.
- getRegexpExpression() : string
- Returns the regular expression operator.
- getRenameTableSQL() : array<int, string>
- getReservedKeywordsList() : KeywordList
- Returns the keyword list instance of this platform.
- getRoundExpression() : string
- Returns the SQL snippet to round a numeric column to the number of decimals specified.
- getRtrimExpression() : string
- Returns the SQL snippet to trim trailing space characters from the expression.
- getSequenceNextValSQL() : string
- getSetTransactionIsolationSQL() : string
- Returns the SQL to set the transaction isolation level.
- getSinExpression() : string
- Returns the SQL to get the sine of a value.
- getSmallIntTypeDeclarationSQL() : string
- Returns the SQL snippet that declares a 2 byte integer column.
- getSqlCommentEndString() : string
- Gets the string portion that ends an SQL comment.
- getSqlCommentStartString() : string
- Gets the string portion that starts an SQL comment.
- getSqrtExpression() : string
- Returns the SQL snippet to get the squared value of a column.
- getStringLiteralQuoteCharacter() : string
- Gets the character used for string literal quoting.
- getStringTypeDeclarationSQL() : string
- Returns the SQL snippet used to declare a string column type.
- getSubstringExpression() : string
- Returns a SQL snippet to get a substring inside an SQL statement.
- getSumExpression() : string
- Returns the SQL snippet to get the total sum of a column.
- getTemporaryTableName() : string
- Some vendors require temporary table names to be qualified specially.
- getTemporaryTableSQL() : string
- Returns the required SQL string that fits between CREATE ... TABLE to create the table as a temporary table.
- getTimeFormatString() : string
- Gets the format string, as accepted by the date() function, that describes the format of a stored time value of this platform.
- getTimeTypeDeclarationSQL() : string
- Obtains DBMS specific SQL to be used to create time columns in statements like CREATE TABLE.
- getTrimExpression() : string
- Returns the SQL snippet to trim a string.
- getTruncateTableSQL() : string
- Generates a Truncate Table SQL statement for a given table.
- getUniqueConstraintDeclarationSQL() : string
- Obtains DBMS specific SQL code portion needed to set a unique constraint declaration to be used in statements like CREATE TABLE.
- getUniqueFieldDeclarationSQL() : string
- Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint of a column declaration to be used in statements like CREATE TABLE.
- getUpperExpression() : string
- Returns the SQL snippet to change all characters from the expression to uppercase, according to the current character set mapping.
- getVarcharDefaultLength() : int
- Gets the default length of a varchar column.
- getVarcharMaxLength() : int
- Gets the maximum length of a varchar column.
- getVarcharTypeDeclarationSQL() : string
- Returns the SQL snippet used to declare a VARCHAR column type.
- getWildcards() : array<string|int, string>
- Gets all SQL wildcard characters of the platform.
- getWriteLockSQL() : string
- Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.
- hasDoctrineTypeMappingFor() : bool
- Checks if a database type is currently supported by this platform.
- hasNativeGuidType() : bool
- Does this platform have native guid type.
- hasNativeJsonType() : bool
- Does this platform have native JSON type.
- isCommentedDoctrineType() : bool
- Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?
- markDoctrineTypeCommented() : void
- Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.
- modifyLimitQuery() : string
- Adds an driver-specific LIMIT clause to the query.
- prefersIdentityColumns() : bool
- Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
- quoteIdentifier() : string
- Quotes a string so that it can be safely used as a table or column name, even if it is a reserved word of the platform. This also detects identifier chains separated by dot and quotes them independently.
- quoteSingleIdentifier() : string
- Quotes a single identifier (no dot chain separation).
- quoteStringLiteral() : string
- Quotes a literal string.
- registerDoctrineTypeMapping() : void
- Registers a doctrine type to be used in conjunction with a column type of this platform.
- releaseSavePoint() : string
- Returns the SQL to release a savepoint.
- rollbackSavePoint() : string
- Returns the SQL to rollback a savepoint.
- setEventManager() : void
- Sets the EventManager used by the Platform.
- supportsAlterTable() : bool
- Whether the platform supports altering tables.
- supportsColumnCollation() : bool
- Does this platform support column collation?
- supportsColumnLengthIndexes() : bool
- Whether the platform supports indexes with column length definitions.
- supportsCommentOnStatement() : bool
- Whether this platform support the proprietary syntax "COMMENT ON asset".
- supportsCreateDropDatabase() : bool
- Whether this platform supports create database.
- supportsForeignKeyConstraints() : bool
- Whether the platform supports foreign key constraints.
- supportsGettingAffectedRows() : bool
- Whether the platform supports getting the affected rows of a recent update/delete type query.
- supportsIdentityColumns() : bool
- Whether the platform supports identity columns.
- supportsIndexes() : bool
- Whether the platform supports indexes.
- supportsInlineColumnComments() : bool
- Whether this platform support to add inline column comments as postfix.
- supportsLimitOffset() : bool
- Whether the database platform support offsets in modify limit clauses.
- supportsPartialIndexes() : bool
- Whether the platform supports partial indexes.
- supportsPrimaryConstraints() : bool
- Whether the platform supports primary key constraints.
- supportsReleaseSavepoints() : bool
- Whether the platform supports releasing savepoints.
- supportsSavepoints() : bool
- Whether the platform supports savepoints.
- supportsSchemas() : bool
- Whether the platform supports database schemas.
- supportsSequences() : bool
- Whether the platform supports sequences.
- supportsTransactions() : bool
- Whether the platform supports transactions.
- supportsViews() : bool
- Whether this platform supports views.
- usesSequenceEmulatedIdentityColumns() : bool
- Whether the platform emulates identity columns through sequences.
- _getCommonIntegerTypeDeclarationSQL() : string
- Returns the SQL snippet that declares common properties of an integer column.
- _getCreateTableSQL() : array<string|int, string>
- Returns the SQL used to create a table.
- _getTransactionIsolationLevelSQL() : string
- Returns the SQL for a given transaction isolation level Connection constant.
- createReservedKeywordsList() : KeywordList
- Creates an instance of the reserved keyword list of this platform.
- doModifyLimitQuery() : string
- Adds an platform-specific LIMIT clause to the query.
- getBinaryTypeDeclarationSQLSnippet() : string
- Returns the SQL snippet used to declare a BINARY/VARBINARY column type.
- getColumnComment() : string|null
- Gets the comment of a passed column modified by potential doctrine type comment hints.
- getCommentOnTableSQL() : string
- getCreateIndexSQLFlags() : string
- Adds additional flags for index generation.
- getDateArithmeticIntervalExpression() : string
- Returns the SQL for a date arithmetic expression.
- getDropPrimaryKeySQL() : string
- getLikeWildcardCharacters() : string
- getPartialIndexSQL() : string
- Adds condition for partial index.
- getPostAlterTableIndexForeignKeySQL() : array<string|int, string>
- getPostAlterTableRenameIndexForeignKeySQL() : array<string|int, string>
- getPreAlterTableIndexForeignKeySQL() : array<string|int, string>
- getPreAlterTableRenameIndexForeignKeySQL() : array<string|int, string>
- getRenameIndexSQL() : array<string|int, string>
- Returns the SQL for renaming an index on a table.
- getReservedKeywordsClass() : string
- Returns the class name of the reserved keywords list.
- getVarcharTypeDeclarationSQLSnippet() : string
- initializeCommentedDoctrineTypes() : void
- Initializes the Doctrine Type comments instance variable for in_array() checks.
- initializeDoctrineTypeMappings() : void
- Lazy load Doctrine Type Mappings.
- onSchemaAlterTable() : bool
- onSchemaAlterTableAddColumn() : bool
- onSchemaAlterTableChangeColumn() : bool
- onSchemaAlterTableRemoveColumn() : bool
- onSchemaAlterTableRenameColumn() : bool
- buildCreateTableSQL() : array<int, string>
- buildPartitionOptions() : string
- Build SQL for partition options.
- buildTableOptions() : string
- Build SQL for table options
- columnToArray() : array<string, mixed>
- engineSupportsForeignKeys() : bool
- getDatabaseNameSQL() : string
- getPreAlterTableAlterIndexForeignKeySQL() : array<string|int, string>
- getPreAlterTableAlterPrimaryKeySQL() : array<string|int, string>
- getRemainingForeignKeyConstraintsRequiringRenamedIndexes() : array<string|int, ForeignKeyConstraint>
- Returns the remaining foreign key constraints that require one of the renamed indexes.
- getUnsignedDeclaration() : string
- Get unsigned declaration for a column.
- indexAssetsByLowerCaseName() : array<string, T>
- initializeAllDoctrineTypeMappings() : void
- Initializes Doctrine Type Mappings with the platform defaults and with all additional type mappings.
Constants
CREATE_FOREIGNKEYS
public
mixed
CREATE_FOREIGNKEYS
= 2
CREATE_INDEXES
public
mixed
CREATE_INDEXES
= 1
LENGTH_LIMIT_BLOB
public
mixed
LENGTH_LIMIT_BLOB
= 65535
LENGTH_LIMIT_MEDIUMBLOB
public
mixed
LENGTH_LIMIT_MEDIUMBLOB
= 16777215
LENGTH_LIMIT_MEDIUMTEXT
public
mixed
LENGTH_LIMIT_MEDIUMTEXT
= 16777215
LENGTH_LIMIT_TEXT
public
mixed
LENGTH_LIMIT_TEXT
= 65535
LENGTH_LIMIT_TINYBLOB
public
mixed
LENGTH_LIMIT_TINYBLOB
= 255
LENGTH_LIMIT_TINYTEXT
public
mixed
LENGTH_LIMIT_TINYTEXT
= 255
Properties
$_eventManager
protected
EventManager|null
$_eventManager
Tags
$_keywords
Holds the KeywordList instance for the current platform.
protected
KeywordList|null
$_keywords
$doctrineTypeComments
Contains a list of all columns that should generate parseable column comments for type-detection in reverse engineering scenarios.
protected
array<string|int, string>|null
$doctrineTypeComments
Tags
$doctrineTypeMapping
protected
array<string|int, string>|null
$doctrineTypeMapping
Methods
appendLockHint()
Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.
public
appendLockHint(string $fromClause, int $lockMode) : string
Parameters
- $fromClause : string
-
The FROM clause to append the hint for the given lock mode to
- $lockMode : int
-
One of the Doctrine\DBAL\LockMode::* constants
Tags
Return values
stringcanEmulateSchemas()
Whether this platform can emulate schemas.
public
canEmulateSchemas() : bool
Tags
Return values
boolcolumnsEqual()
Compares the definitions of the given columns in the context of this platform.
public
columnsEqual(Column $column1, Column $column2) : bool
Parameters
Tags
Return values
boolconvertBooleans()
Some platforms need the boolean values to be converted.
public
convertBooleans(mixed $item) : mixed
The default conversion in this implementation converts to integers (false => 0, true => 1).
Note: if the input is not a boolean the original input might be returned.
There are two contexts when converting booleans: Literals and Prepared Statements. This method should handle the literal case
Parameters
- $item : mixed
-
A boolean or an array of them.
Return values
mixed —A boolean database value or an array of them.
convertBooleansToDatabaseValue()
This method should handle the prepared statements case. When there is no distinction, it's OK to use the same method.
public
convertBooleansToDatabaseValue(mixed $item) : mixed
Note: if the input is not a boolean the original input might be returned.
Parameters
- $item : mixed
-
A boolean or an array of them.
Return values
mixed —A boolean database value or an array of them.
convertFromBoolean()
Some platforms have boolean literals that needs to be correctly converted
public
convertFromBoolean(T $item) : mixed
The default conversion tries to convert value into bool "(bool)$item"
Parameters
- $item : T
Tags
createSavePoint()
Returns the SQL to create a new savepoint.
public
createSavePoint(string $savepoint) : string
Parameters
- $savepoint : string
Return values
stringcreateSchemaManager()
Creates the schema manager that can be used to inspect and change the underlying database schema according to the dialect of the platform.
public
createSchemaManager(Connection $connection) : AbstractSchemaManager
Parameters
- $connection : Connection
Tags
Return values
AbstractSchemaManagerescapeStringForLike()
Escapes metacharacters in a string intended to be used with a LIKE operator.
public
final escapeStringForLike(string $inputString, string $escapeChar) : string
Parameters
- $inputString : string
-
a literal, unquoted string
- $escapeChar : string
-
should be reused by the caller in the LIKE expression.
Return values
stringgetAcosExpression()
Returns the SQL to get the arccosine of a value.
public
getAcosExpression(string $value) : string
Parameters
- $value : string
Tags
Return values
stringgetAdvancedForeignKeyOptionsSQL()
Returns the FOREIGN KEY query section dealing with non-standard options as MATCH, INITIALLY DEFERRED, ON UPDATE, .
public
getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey) : string
..
Parameters
- $foreignKey : ForeignKeyConstraint
-
The foreign key definition.
Return values
stringgetAlterSchemaSQL()
Generates SQL statements that can be used to apply the diff.
public
getAlterSchemaSQL(SchemaDiff $diff) : array<int, string>
Parameters
- $diff : SchemaDiff
Return values
array<int, string>getAlterSequenceSQL()
Returns the SQL to change a sequence on this platform.
public
getAlterSequenceSQL(Sequence $sequence) : string
Parameters
- $sequence : Sequence
Tags
Return values
stringgetAlterTableSQL()
Gets the SQL statements for altering an existing table.
public
getAlterTableSQL(TableDiff $diff) : array<int, string>
This method returns an array of SQL statements, since some platforms need several statements.
Parameters
- $diff : TableDiff
Tags
Return values
array<int, string>getAsciiStringTypeDeclarationSQL()
Returns the SQL snippet used to declare a column that can store characters in the ASCII character set
public
getAsciiStringTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Return values
stringgetAvgExpression()
Returns the SQL snippet to get the average value of a column.
public
getAvgExpression(string $column) : string
Parameters
- $column : string
-
The column to use.
Tags
Return values
string —Generated SQL including an AVG aggregate function.
getBetweenExpression()
Returns the SQL that checks if an expression evaluates to a value between two values.
public
getBetweenExpression(string $expression, string $value1, string $value2) : string
The parameter $expression is checked if it is between $value1 and $value2.
Note: There is a slight difference in the way BETWEEN works on some databases. http://www.w3schools.com/sql/sql_between.asp. If you want complete database independence you should avoid using between().
Parameters
- $expression : string
-
The value to compare to.
- $value1 : string
-
The lower value to compare with.
- $value2 : string
-
The higher value to compare with.
Tags
Return values
string —The logical expression.
getBigIntTypeDeclarationSQL()
Returns the SQL snippet that declares an 8 byte integer column.
public
abstract getBigIntTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Return values
stringgetBinaryDefaultLength()
Gets the default length of a binary column.
public
getBinaryDefaultLength() : int
Tags
Return values
intgetBinaryMaxLength()
Gets the maximum length of a binary column.
public
getBinaryMaxLength() : int
Tags
Return values
intgetBinaryTypeDeclarationSQL()
Returns the SQL snippet used to declare a BINARY/VARBINARY column type.
public
getBinaryTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
-
The column definition.
Return values
stringgetBitAndComparisonExpression()
Returns the SQL bit AND comparison expression.
public
getBitAndComparisonExpression(string $value1, string $value2) : string
Parameters
- $value1 : string
- $value2 : string
Return values
stringgetBitOrComparisonExpression()
Returns the SQL bit OR comparison expression.
public
getBitOrComparisonExpression(string $value1, string $value2) : string
Parameters
- $value1 : string
- $value2 : string
Return values
stringgetBlobTypeDeclarationSQL()
Returns the SQL Snippet used to declare a BLOB column type.
public
abstract getBlobTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Return values
stringgetBooleanTypeDeclarationSQL()
Returns the SQL snippet that declares a boolean column.
public
abstract getBooleanTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Return values
stringgetCharMaxLength()
Gets the maximum length of a char column.
public
getCharMaxLength() : int
Tags
Return values
intgetCheckDeclarationSQL()
Obtains DBMS specific SQL code portion needed to set a CHECK constraint declaration to be used in statements like CREATE TABLE.
public
getCheckDeclarationSQL(array<string|int, string>|array<string|int, array<string|int, mixed>> $definition) : string
Parameters
- $definition : array<string|int, string>|array<string|int, array<string|int, mixed>>
-
The check definition.
Return values
string —DBMS specific SQL code portion needed to set a CHECK constraint.
getClobTypeDeclarationSQL()
Returns the SQL snippet used to declare a CLOB column type.
public
abstract getClobTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Return values
stringgetColumnCharsetDeclarationSQL()
Obtains DBMS specific SQL code portion needed to set the CHARACTER SET of a column declaration to be used in statements like CREATE TABLE.
public
getColumnCharsetDeclarationSQL(string $charset) : string
Parameters
- $charset : string
-
The name of the charset.
Return values
string —DBMS specific SQL code portion needed to set the CHARACTER SET of a column declaration.
getColumnCollationDeclarationSQL()
Obtains DBMS specific SQL code portion needed to set the COLLATION of a column declaration to be used in statements like CREATE TABLE.
public
getColumnCollationDeclarationSQL(string $collation) : string
Parameters
- $collation : string
-
The name of the collation.
Return values
string —DBMS specific SQL code portion needed to set the COLLATION of a column declaration.
getColumnDeclarationListSQL()
Gets declaration of a number of columns in bulk.
public
getColumnDeclarationListSQL(array<string|int, array<string|int, mixed>> $columns) : string
Parameters
- $columns : array<string|int, array<string|int, mixed>>
-
A multidimensional associative array. The first dimension determines the column name, while the second dimension is keyed with the name of the properties of the column being declared as array indexes. Currently, the types of supported column properties are as follows:
length Integer value that determines the maximum length of the text column. If this argument is missing the column should be declared to have the longest length allowed by the DBMS.
default Text value to be used as default for this column.
notnull Boolean flag that indicates whether this column is constrained to not be set to null. charset Text value with the default CHARACTER SET for this column. collation Text value with the default COLLATION for this column. unique unique constraint
Return values
stringgetColumnDeclarationSQL()
Obtains DBMS specific SQL code portion needed to declare a generic type column to be used in statements like CREATE TABLE.
public
getColumnDeclarationSQL(string $name, array<string|int, mixed> $column) : string
Parameters
- $name : string
-
The name the column to be declared.
- $column : array<string|int, mixed>
-
An associative array with the name of the properties of the column being declared as array indexes. Currently, the types of supported column properties are as follows:
length Integer value that determines the maximum length of the text column. If this argument is missing the column should be declared to have the longest length allowed by the DBMS.
default Text value to be used as default for this column.
notnull Boolean flag that indicates whether this column is constrained to not be set to null. charset Text value with the default CHARACTER SET for this column. collation Text value with the default COLLATION for this column. unique unique constraint check column check constraint columnDefinition a string that defines the complete column
Tags
Return values
string —DBMS specific SQL code portion that should be used to declare the column.
getColumnsFieldDeclarationListSQL()
Obtains DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE.
public
getColumnsFieldDeclarationListSQL(array<string|int, mixed> $columns) : string
Parameters
- $columns : array<string|int, mixed>
Tags
Return values
stringgetCommentOnColumnSQL()
public
getCommentOnColumnSQL(string $tableName, string $columnName, string|null $comment) : string
Parameters
- $tableName : string
- $columnName : string
- $comment : string|null
Return values
stringgetConcatExpression()
Returns a SQL snippet to concatenate the given expressions.
public
getConcatExpression() : string
Accepts an arbitrary number of string parameters. Each parameter must contain an expression.
Return values
stringgetCosExpression()
Returns the SQL to get the cosine of a value.
public
getCosExpression(string $value) : string
Parameters
- $value : string
Tags
Return values
stringgetCountExpression()
Returns the SQL snippet to get the number of rows (without a NULL value) of a column.
public
getCountExpression(string|int $column) : string
If a '*' is used instead of a column the number of selected rows is returned.
Parameters
- $column : string|int
-
The column to use.
Tags
Return values
string —Generated SQL including a COUNT aggregate function.
getCreateConstraintSQL()
Returns the SQL to create a constraint on a table on this platform.
public
getCreateConstraintSQL(Constraint $constraint, Table|string $table) : string
Parameters
- $constraint : Constraint
- $table : Table|string
Tags
Return values
stringgetCreateDatabaseSQL()
Returns the SQL to create a new database.
public
getCreateDatabaseSQL(string $name) : string
Parameters
- $name : string
-
The name of the database that should be created.
Tags
Return values
stringgetCreateForeignKeySQL()
Returns the SQL to create a new foreign key.
public
getCreateForeignKeySQL(ForeignKeyConstraint $foreignKey, Table|string $table) : string
Parameters
- $foreignKey : ForeignKeyConstraint
-
The foreign key constraint.
- $table : Table|string
-
The name of the table on which the foreign key is to be created.
Return values
stringgetCreateIndexSQL()
Returns the SQL to create an index on a table on this platform.
public
getCreateIndexSQL(Index $index, Table|string $table) : string
Parameters
Tags
Return values
stringgetCreatePrimaryKeySQL()
Returns the SQL to create an unnamed primary key constraint.
public
getCreatePrimaryKeySQL(Index $index, Table|string $table) : string
Parameters
Return values
stringgetCreateSchemaSQL()
Returns the SQL to create a named schema.
public
getCreateSchemaSQL(string $schemaName) : string
Parameters
- $schemaName : string
Tags
Return values
stringgetCreateSequenceSQL()
Returns the SQL to create a sequence on this platform.
public
getCreateSequenceSQL(Sequence $sequence) : string
Parameters
- $sequence : Sequence
Tags
Return values
stringgetCreateTableSQL()
Returns the SQL statement(s) to create a table with the specified name, columns and constraints on this platform.
public
getCreateTableSQL(Table $table[, int $createFlags = self::CREATE_INDEXES ]) : array<int, string>
Parameters
- $table : Table
- $createFlags : int = self::CREATE_INDEXES
Tags
Return values
array<int, string> —The list of SQL statements.
getCreateTablesSQL()
public
getCreateTablesSQL(array<int, Table> $tables) : array<int, string>
Parameters
- $tables : array<int, Table>
Tags
Return values
array<int, string>getCreateTemporaryTableSnippetSQL()
public
getCreateTemporaryTableSnippetSQL() : string
Return values
stringgetCreateUniqueConstraintSQL()
Returns the SQL to create a unique constraint on a table on this platform.
public
getCreateUniqueConstraintSQL(UniqueConstraint $constraint, string $tableName) : string
Parameters
- $constraint : UniqueConstraint
- $tableName : string
Return values
stringgetCreateViewSQL()
public
getCreateViewSQL(string $name, string $sql) : string
Parameters
- $name : string
- $sql : string
Return values
stringgetCurrentDatabaseExpression()
Returns the SQL expression which represents the currently selected database.
public
abstract getCurrentDatabaseExpression() : string
Return values
stringgetCurrentDateSQL()
Returns the SQL specific for the platform to get the current date.
public
getCurrentDateSQL() : string
Return values
stringgetCurrentTimeSQL()
Returns the SQL specific for the platform to get the current time.
public
getCurrentTimeSQL() : string
Return values
stringgetCurrentTimestampSQL()
Returns the SQL specific for the platform to get the current timestamp
public
getCurrentTimestampSQL() : string
Return values
stringgetCustomTypeDeclarationSQL()
Obtains SQL code portion needed to create a custom column, e.g. when a column has the "columnDefinition" keyword.
public
getCustomTypeDeclarationSQL(array<string|int, mixed> $column) : string
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.
Parameters
- $column : array<string|int, mixed>
Tags
Return values
stringgetDateAddDaysExpression()
Returns the SQL to add the number of given days to a date.
public
getDateAddDaysExpression(string $date, int|numeric-string $days) : string
Parameters
- $date : string
- $days : int|numeric-string
Tags
Return values
stringgetDateAddHourExpression()
Returns the SQL to add the number of given hours to a date.
public
getDateAddHourExpression(string $date, int|numeric-string $hours) : string
Parameters
- $date : string
- $hours : int|numeric-string
Tags
Return values
stringgetDateAddMinutesExpression()
Returns the SQL to add the number of given minutes to a date.
public
getDateAddMinutesExpression(string $date, int|numeric-string $minutes) : string
Parameters
- $date : string
- $minutes : int|numeric-string
Tags
Return values
stringgetDateAddMonthExpression()
Returns the SQL to add the number of given months to a date.
public
getDateAddMonthExpression(string $date, int|numeric-string $months) : string
Parameters
- $date : string
- $months : int|numeric-string
Tags
Return values
stringgetDateAddQuartersExpression()
Returns the SQL to add the number of given quarters to a date.
public
getDateAddQuartersExpression(string $date, int|numeric-string $quarters) : string
Parameters
- $date : string
- $quarters : int|numeric-string
Tags
Return values
stringgetDateAddSecondsExpression()
Returns the SQL to add the number of given seconds to a date.
public
getDateAddSecondsExpression(string $date, int|numeric-string $seconds) : string
Parameters
- $date : string
- $seconds : int|numeric-string
Tags
Return values
stringgetDateAddWeeksExpression()
Returns the SQL to add the number of given weeks to a date.
public
getDateAddWeeksExpression(string $date, int|numeric-string $weeks) : string
Parameters
- $date : string
- $weeks : int|numeric-string
Tags
Return values
stringgetDateAddYearsExpression()
Returns the SQL to add the number of given years to a date.
public
getDateAddYearsExpression(string $date, int|numeric-string $years) : string
Parameters
- $date : string
- $years : int|numeric-string
Tags
Return values
stringgetDateDiffExpression()
Returns the SQL to calculate the difference in days between the two passed dates.
public
getDateDiffExpression(string $date1, string $date2) : string
Computes diff = date1 - date2.
Parameters
- $date1 : string
- $date2 : string
Tags
Return values
stringgetDateFormatString()
Gets the format string, as accepted by the date() function, that describes the format of a stored date value of this platform.
public
getDateFormatString() : string
Return values
string —The format string.
getDateSubDaysExpression()
Returns the SQL to subtract the number of given days to a date.
public
getDateSubDaysExpression(string $date, int|numeric-string $days) : string
Parameters
- $date : string
- $days : int|numeric-string
Tags
Return values
stringgetDateSubHourExpression()
Returns the SQL to subtract the number of given hours to a date.
public
getDateSubHourExpression(string $date, int|numeric-string $hours) : string
Parameters
- $date : string
- $hours : int|numeric-string
Tags
Return values
stringgetDateSubMinutesExpression()
Returns the SQL to subtract the number of given minutes from a date.
public
getDateSubMinutesExpression(string $date, int|numeric-string $minutes) : string
Parameters
- $date : string
- $minutes : int|numeric-string
Tags
Return values
stringgetDateSubMonthExpression()
Returns the SQL to subtract the number of given months to a date.
public
getDateSubMonthExpression(string $date, int|numeric-string $months) : string
Parameters
- $date : string
- $months : int|numeric-string
Tags
Return values
stringgetDateSubQuartersExpression()
Returns the SQL to subtract the number of given quarters from a date.
public
getDateSubQuartersExpression(string $date, int|numeric-string $quarters) : string
Parameters
- $date : string
- $quarters : int|numeric-string
Tags
Return values
stringgetDateSubSecondsExpression()
Returns the SQL to subtract the number of given seconds from a date.
public
getDateSubSecondsExpression(string $date, int|numeric-string $seconds) : string
Parameters
- $date : string
- $seconds : int|numeric-string
Tags
Return values
stringgetDateSubWeeksExpression()
Returns the SQL to subtract the number of given weeks from a date.
public
getDateSubWeeksExpression(string $date, int|numeric-string $weeks) : string
Parameters
- $date : string
- $weeks : int|numeric-string
Tags
Return values
stringgetDateSubYearsExpression()
Returns the SQL to subtract the number of given years from a date.
public
getDateSubYearsExpression(string $date, int|numeric-string $years) : string
Parameters
- $date : string
- $years : int|numeric-string
Tags
Return values
stringgetDateTimeFormatString()
Gets the format string, as accepted by the date() function, that describes the format of a stored datetime value of this platform.
public
getDateTimeFormatString() : string
Return values
string —The format string.
getDateTimeTypeDeclarationSQL()
Obtains DBMS specific SQL to be used to create datetime columns in statements like CREATE TABLE.
public
getDateTimeTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Tags
Return values
stringgetDateTimeTzFormatString()
Gets the format string, as accepted by the date() function, that describes the format of a stored datetime with timezone value of this platform.
public
getDateTimeTzFormatString() : string
Return values
string —The format string.
getDateTimeTzTypeDeclarationSQL()
Obtains DBMS specific SQL to be used to create datetime with timezone offset columns.
public
getDateTimeTzTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Return values
stringgetDateTypeDeclarationSQL()
Obtains DBMS specific SQL to be used to create date columns in statements like CREATE TABLE.
public
getDateTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Tags
Return values
stringgetDecimalTypeDeclarationSQL()
Returns the SQL snippet that declares a floating point column of arbitrary precision.
public
getDecimalTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Return values
stringgetDefaultSchemaName()
Returns the default schema name.
public
getDefaultSchemaName() : string
Tags
Return values
stringgetDefaultTransactionIsolationLevel()
Gets the default transaction isolation level of the platform.
public
getDefaultTransactionIsolationLevel() : TransactionIsolationLevel::*
Tags
Return values
TransactionIsolationLevel::* —The default isolation level.
getDefaultValueDeclarationSQL()
Obtains DBMS specific SQL code portion needed to set a default value declaration to be used in statements like CREATE TABLE.
public
getDefaultValueDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
-
The column definition array.
Return values
string —DBMS specific SQL code portion needed to set a default value.
getDoctrineTypeComment()
Gets the comment to append to a column comment that helps parsing this type in reverse engineering.
public
getDoctrineTypeComment(Type $doctrineType) : string
Parameters
- $doctrineType : Type
Tags
Return values
stringgetDoctrineTypeMapping()
Gets the Doctrine type that is mapped for the given database column type.
public
getDoctrineTypeMapping(string $dbType) : string
Parameters
- $dbType : string
Tags
Return values
stringgetDropDatabaseSQL()
Returns the SQL snippet to drop an existing database.
public
getDropDatabaseSQL(string $name) : string
Parameters
- $name : string
-
The name of the database that should be dropped.
Return values
stringgetDropForeignKeySQL()
Returns the SQL to drop a foreign key.
public
getDropForeignKeySQL(ForeignKeyConstraint|string $foreignKey, Table|string $table) : string
Parameters
- $foreignKey : ForeignKeyConstraint|string
- $table : Table|string
Return values
stringgetDropIndexSQL()
Returns the SQL to drop an index from a table.
public
getDropIndexSQL(Index|string $index[, Table|string|null $table = null ]) : string
Parameters
Tags
Return values
stringgetDropSchemaSQL()
Returns the SQL snippet to drop a schema.
public
getDropSchemaSQL(string $schemaName) : string
Parameters
- $schemaName : string
Tags
Return values
stringgetDropSequenceSQL()
Returns the SQL snippet to drop an existing sequence.
public
getDropSequenceSQL(Sequence|string $sequence) : string
Parameters
- $sequence : Sequence|string
Tags
Return values
stringgetDropTableSQL()
Returns the SQL snippet to drop an existing table.
public
getDropTableSQL(Table|string $table) : string
Parameters
- $table : Table|string
Tags
Return values
stringgetDropTablesSQL()
public
getDropTablesSQL(array<int, Table> $tables) : array<int, string>
Parameters
- $tables : array<int, Table>
Return values
array<int, string>getDropTemporaryTableSQL()
Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.
public
getDropTemporaryTableSQL(Table|string $table) : string
Parameters
- $table : Table|string
Return values
stringgetDropUniqueConstraintSQL()
Returns the SQL to drop a unique constraint.
public
getDropUniqueConstraintSQL(string $name, string $tableName) : string
Parameters
- $name : string
- $tableName : string
Return values
stringgetDropViewSQL()
public
getDropViewSQL(string $name) : string
Parameters
- $name : string
Return values
stringgetDummySelectSQL()
This is for test reasons, many vendors have special requirements for dummy statements.
public
getDummySelectSQL() : string
Return values
stringgetEmptyIdentityInsertSQL()
Returns the insert SQL for an empty insert statement.
public
getEmptyIdentityInsertSQL(string $quotedTableName, string $quotedIdentifierColumnName) : string
Parameters
- $quotedTableName : string
- $quotedIdentifierColumnName : string
Return values
stringgetEventManager()
Gets the EventManager used by the Platform.
public
getEventManager() : EventManager|null
Tags
Return values
EventManager|nullgetFloatDeclarationSQL()
public
getFloatDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Return values
stringgetForeignKeyBaseDeclarationSQL()
Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint of a column declaration to be used in statements like CREATE TABLE.
public
getForeignKeyBaseDeclarationSQL(ForeignKeyConstraint $foreignKey) : string
Parameters
- $foreignKey : ForeignKeyConstraint
Tags
Return values
stringgetForeignKeyDeclarationSQL()
Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint of a column declaration to be used in statements like CREATE TABLE.
public
getForeignKeyDeclarationSQL(ForeignKeyConstraint $foreignKey) : string
Parameters
- $foreignKey : ForeignKeyConstraint
Return values
string —DBMS specific SQL code portion needed to set the FOREIGN KEY constraint of a column declaration.
getForeignKeyReferentialActionSQL()
Returns the given referential action in uppercase if valid, otherwise throws an exception.
public
getForeignKeyReferentialActionSQL(string $action) : string
Parameters
- $action : string
-
The foreign key referential action.
Tags
Return values
stringgetForUpdateSQL()
Returns the FOR UPDATE expression.
public
getForUpdateSQL() : string
Return values
stringgetGuidTypeDeclarationSQL()
Returns the SQL snippet to declare a GUID/UUID column.
public
getGuidTypeDeclarationSQL(array<string|int, mixed> $column) : string
By default this maps directly to a CHAR(36) and only maps to more special datatypes when the underlying databases support this datatype.
Parameters
- $column : array<string|int, mixed>
Return values
stringgetIdentifierQuoteCharacter()
Gets the character used for identifier quoting.
public
getIdentifierQuoteCharacter() : string
Tags
Return values
stringgetIdentitySequenceName()
Returns the name of the sequence for a particular identity column in a particular table.
public
getIdentitySequenceName(string $tableName, string $columnName) : string
Parameters
- $tableName : string
-
The name of the table to return the sequence name for.
- $columnName : string
-
The name of the identity column in the table to return the sequence name for.
Tags
Return values
stringgetIndexDeclarationSQL()
Obtains DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE.
public
getIndexDeclarationSQL(string $name, Index $index) : string
Parameters
- $name : string
-
The name of the index.
- $index : Index
-
The index definition.
Tags
Return values
string —DBMS specific SQL code portion needed to set an index.
getIndexFieldDeclarationListSQL()
Obtains DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE.
public
getIndexFieldDeclarationListSQL(Index $index) : string
Parameters
- $index : Index
Tags
Return values
stringgetInlineColumnCommentSQL()
Returns the SQL to create inline comment on a column.
public
getInlineColumnCommentSQL(string $comment) : string
Parameters
- $comment : string
Tags
Return values
stringgetIntegerTypeDeclarationSQL()
Returns the SQL snippet that declares a 4 byte integer column.
public
abstract getIntegerTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Return values
stringgetIsNotNullExpression()
Returns the SQL that checks if an expression is not null.
public
getIsNotNullExpression(string $expression) : string
Parameters
- $expression : string
-
The expression that should be compared to null.
Tags
Return values
string —The logical expression.
getIsNullExpression()
Returns the SQL that checks if an expression is null.
public
getIsNullExpression(string $expression) : string
Parameters
- $expression : string
-
The expression that should be compared to null.
Tags
Return values
string —The logical expression.
getJsonTypeDeclarationSQL()
Returns the SQL snippet to declare a JSON column.
public
getJsonTypeDeclarationSQL(array<string|int, mixed> $column) : string
By default this maps directly to a CLOB and only maps to more special datatypes when the underlying databases support this datatype.
Parameters
- $column : array<string|int, mixed>
Return values
stringgetLengthExpression()
Returns the SQL snippet to get the length of a text column in characters.
public
getLengthExpression(string $column) : string
Parameters
- $column : string
Return values
stringgetListNamespacesSQL()
Returns the SQL statement for retrieving the namespaces defined in the database.
public
getListNamespacesSQL() : string
Tags
Return values
stringgetListTableColumnsSQL()
public
getListTableColumnsSQL(string $table[, string $database = null ]) : string
Parameters
- $table : string
- $database : string = null
Tags
Return values
stringgetListTableConstraintsSQL()
public
getListTableConstraintsSQL(string $table) : string
Parameters
- $table : string
Tags
Return values
stringgetListTableForeignKeysSQL()
public
getListTableForeignKeysSQL(string $table) : string
Parameters
- $table : string
Tags
Return values
stringgetListTableIndexesSQL()
public
getListTableIndexesSQL(string $table[, string $database = null ]) : string
Parameters
- $table : string
- $database : string = null
Tags
Return values
stringgetListTableMetadataSQL()
public
getListTableMetadataSQL(string $table[, string|null $database = null ]) : string
Parameters
- $table : string
- $database : string|null = null
Tags
Return values
stringgetListTablesSQL()
public
getListTablesSQL() : string
Tags
Return values
stringgetListUsersSQL()
public
getListUsersSQL() : string
Tags
Return values
stringgetLocateExpression()
Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.
public
getLocateExpression(string $str, string $substr[, string|int|false $startPos = false ]) : string
Parameters
- $str : string
-
Literal string.
- $substr : string
-
Literal string to find.
- $startPos : string|int|false = false
-
Position to start at, beginning of string by default.
Tags
Return values
stringgetLowerExpression()
Returns the SQL snippet to change all characters from the expression to lowercase, according to the current character set mapping.
public
getLowerExpression(string $str) : string
Parameters
- $str : string
-
Literal string or column name.
Tags
Return values
stringgetLtrimExpression()
Returns the SQL snippet to trim leading space characters from the expression.
public
getLtrimExpression(string $str) : string
Parameters
- $str : string
-
Literal string or column name.
Tags
Return values
stringgetMaxExpression()
Returns the SQL snippet to get the highest value of a column.
public
getMaxExpression(string $column) : string
Parameters
- $column : string
-
The column to use.
Tags
Return values
string —Generated SQL including a MAX aggregate function.
getMaxIdentifierLength()
Maximum length of any given database identifier, like tables or column names.
public
getMaxIdentifierLength() : int
Return values
intgetMd5Expression()
Returns the SQL snippet to get the md5 sum of a column.
public
getMd5Expression(string $column) : string
Note: Not SQL92, but common functionality.
Parameters
- $column : string
Tags
Return values
stringgetMinExpression()
Returns the SQL snippet to get the lowest value of a column.
public
getMinExpression(string $column) : string
Parameters
- $column : string
-
The column to use.
Tags
Return values
string —Generated SQL including a MIN aggregate function.
getModExpression()
Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.
public
getModExpression(string $expression1, string $expression2) : string
Parameters
- $expression1 : string
- $expression2 : string
Return values
stringgetName()
Gets the name of the platform.
public
abstract getName() : string
Tags
Return values
stringgetNotExpression()
Returns the SQL for a logical not.
public
getNotExpression(string $expression) : string
Example:
$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));
Parameters
- $expression : string
Tags
Return values
string —The logical expression.
getNowExpression()
Returns the SQL snippet to get the current system date.
public
getNowExpression() : string
Tags
Return values
stringgetPiExpression()
Returns the SQL to get the PI value.
public
getPiExpression() : string
Tags
Return values
stringgetReadLockSQL()
Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.
public
getReadLockSQL() : string
This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database vendors allow to lighten this constraint up to be a real read lock.
Return values
stringgetRegexpExpression()
Returns the regular expression operator.
public
getRegexpExpression() : string
Tags
Return values
stringgetRenameTableSQL()
public
getRenameTableSQL(string $oldName, string $newName) : array<int, string>
Parameters
- $oldName : string
- $newName : string
Return values
array<int, string>getReservedKeywordsList()
Returns the keyword list instance of this platform.
public
final getReservedKeywordsList() : KeywordList
Tags
Return values
KeywordListgetRoundExpression()
Returns the SQL snippet to round a numeric column to the number of decimals specified.
public
getRoundExpression(string $column[, string|int $decimals = 0 ]) : string
Parameters
- $column : string
- $decimals : string|int = 0
Tags
Return values
stringgetRtrimExpression()
Returns the SQL snippet to trim trailing space characters from the expression.
public
getRtrimExpression(string $str) : string
Parameters
- $str : string
-
Literal string or column name.
Tags
Return values
stringgetSequenceNextValSQL()
public
getSequenceNextValSQL(string $sequence) : string
Parameters
- $sequence : string
Tags
Return values
stringgetSetTransactionIsolationSQL()
Returns the SQL to set the transaction isolation level.
public
getSetTransactionIsolationSQL(int $level) : string
Parameters
- $level : int
Tags
Return values
stringgetSinExpression()
Returns the SQL to get the sine of a value.
public
getSinExpression(string $value) : string
Parameters
- $value : string
Tags
Return values
stringgetSmallIntTypeDeclarationSQL()
Returns the SQL snippet that declares a 2 byte integer column.
public
abstract getSmallIntTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Return values
stringgetSqlCommentEndString()
Gets the string portion that ends an SQL comment.
public
getSqlCommentEndString() : string
Tags
Return values
stringgetSqlCommentStartString()
Gets the string portion that starts an SQL comment.
public
getSqlCommentStartString() : string
Tags
Return values
stringgetSqrtExpression()
Returns the SQL snippet to get the squared value of a column.
public
getSqrtExpression(string $column) : string
Parameters
- $column : string
-
The column to use.
Tags
Return values
string —Generated SQL including an SQRT aggregate function.
getStringLiteralQuoteCharacter()
Gets the character used for string literal quoting.
public
getStringLiteralQuoteCharacter() : string
Tags
Return values
stringgetStringTypeDeclarationSQL()
Returns the SQL snippet used to declare a string column type.
public
getStringTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Return values
stringgetSubstringExpression()
Returns a SQL snippet to get a substring inside an SQL statement.
public
getSubstringExpression(string $string, string|int $start[, string|int|null $length = null ]) : string
Note: Not SQL92, but common functionality.
SQLite only supports the 2 parameter variant of this function.
Parameters
- $string : string
-
An sql string literal or column name/alias.
- $start : string|int
-
Where to start the substring portion.
- $length : string|int|null = null
-
The substring portion length.
Return values
stringgetSumExpression()
Returns the SQL snippet to get the total sum of a column.
public
getSumExpression(string $column) : string
Parameters
- $column : string
-
The column to use.
Tags
Return values
string —Generated SQL including a SUM aggregate function.
getTemporaryTableName()
Some vendors require temporary table names to be qualified specially.
public
getTemporaryTableName(string $tableName) : string
Parameters
- $tableName : string
Return values
stringgetTemporaryTableSQL()
Returns the required SQL string that fits between CREATE ... TABLE to create the table as a temporary table.
public
getTemporaryTableSQL() : string
Should be overridden in driver classes to return the correct string for the specific database type.
The default is to return the string "TEMPORARY" - this will result in a SQL error for any database that does not support temporary tables, or that requires a different SQL command from "CREATE TEMPORARY TABLE".
Tags
Return values
string —The string required to be placed between "CREATE" and "TABLE" to generate a temporary table, if possible.
getTimeFormatString()
Gets the format string, as accepted by the date() function, that describes the format of a stored time value of this platform.
public
getTimeFormatString() : string
Return values
string —The format string.
getTimeTypeDeclarationSQL()
Obtains DBMS specific SQL to be used to create time columns in statements like CREATE TABLE.
public
getTimeTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Tags
Return values
stringgetTrimExpression()
Returns the SQL snippet to trim a string.
public
getTrimExpression(string $str[, int $mode = TrimMode::UNSPECIFIED ][, string|bool $char = false ]) : string
Parameters
- $str : string
-
The expression to apply the trim to.
- $mode : int = TrimMode::UNSPECIFIED
-
The position of the trim (leading/trailing/both).
- $char : string|bool = false
-
The char to trim, has to be quoted already. Defaults to space.
Return values
stringgetTruncateTableSQL()
Generates a Truncate Table SQL statement for a given table.
public
getTruncateTableSQL(string $tableName[, bool $cascade = false ]) : string
Cascade is not supported on many platforms but would optionally cascade the truncate by following the foreign keys.
Parameters
- $tableName : string
- $cascade : bool = false
Return values
stringgetUniqueConstraintDeclarationSQL()
Obtains DBMS specific SQL code portion needed to set a unique constraint declaration to be used in statements like CREATE TABLE.
public
getUniqueConstraintDeclarationSQL(string $name, UniqueConstraint $constraint) : string
Parameters
- $name : string
-
The name of the unique constraint.
- $constraint : UniqueConstraint
-
The unique constraint definition.
Tags
Return values
string —DBMS specific SQL code portion needed to set a constraint.
getUniqueFieldDeclarationSQL()
Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint of a column declaration to be used in statements like CREATE TABLE.
public
getUniqueFieldDeclarationSQL() : string
Tags
Return values
string —DBMS specific SQL code portion needed to set the UNIQUE constraint of a column declaration.
getUpperExpression()
Returns the SQL snippet to change all characters from the expression to uppercase, according to the current character set mapping.
public
getUpperExpression(string $str) : string
Parameters
- $str : string
-
Literal string or column name.
Tags
Return values
stringgetVarcharDefaultLength()
Gets the default length of a varchar column.
public
getVarcharDefaultLength() : int
Tags
Return values
intgetVarcharMaxLength()
Gets the maximum length of a varchar column.
public
getVarcharMaxLength() : int
Tags
Return values
intgetVarcharTypeDeclarationSQL()
Returns the SQL snippet used to declare a VARCHAR column type.
public
getVarcharTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Tags
Return values
stringgetWildcards()
Gets all SQL wildcard characters of the platform.
public
getWildcards() : array<string|int, string>
Tags
Return values
array<string|int, string>getWriteLockSQL()
Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.
public
getWriteLockSQL() : string
The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.
Return values
stringhasDoctrineTypeMappingFor()
Checks if a database type is currently supported by this platform.
public
hasDoctrineTypeMappingFor(string $dbType) : bool
Parameters
- $dbType : string
Return values
boolhasNativeGuidType()
Does this platform have native guid type.
public
hasNativeGuidType() : bool
Tags
Return values
boolhasNativeJsonType()
Does this platform have native JSON type.
public
hasNativeJsonType() : bool
Tags
Return values
boolisCommentedDoctrineType()
Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?
public
isCommentedDoctrineType(Type $doctrineType) : bool
Parameters
- $doctrineType : Type
Tags
Return values
boolmarkDoctrineTypeCommented()
Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.
public
markDoctrineTypeCommented(string|Type $doctrineType) : void
Parameters
- $doctrineType : string|Type
modifyLimitQuery()
Adds an driver-specific LIMIT clause to the query.
public
final modifyLimitQuery(string $query, int|null $limit[, int $offset = 0 ]) : string
Parameters
- $query : string
- $limit : int|null
- $offset : int = 0
Tags
Return values
stringprefersIdentityColumns()
Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
public
prefersIdentityColumns() : bool
Subclasses should override this method to return TRUE if they prefer identity columns.
Tags
Return values
boolquoteIdentifier()
Quotes a string so that it can be safely used as a table or column name, even if it is a reserved word of the platform. This also detects identifier chains separated by dot and quotes them independently.
public
quoteIdentifier(string $str) : string
NOTE: Just because you CAN use quoted identifiers doesn't mean you SHOULD use them. In general, they end up causing way more problems than they solve.
Parameters
- $str : string
-
The identifier name to be quoted.
Return values
string —The quoted identifier string.
quoteSingleIdentifier()
Quotes a single identifier (no dot chain separation).
public
quoteSingleIdentifier(string $str) : string
Parameters
- $str : string
-
The identifier name to be quoted.
Return values
string —The quoted identifier string.
quoteStringLiteral()
Quotes a literal string.
public
quoteStringLiteral(string $str) : string
This method is NOT meant to fix SQL injections! It is only meant to escape this platform's string literal quote character inside the given literal string.
Parameters
- $str : string
-
The literal string to be quoted.
Return values
string —The quoted literal string.
registerDoctrineTypeMapping()
Registers a doctrine type to be used in conjunction with a column type of this platform.
public
registerDoctrineTypeMapping(string $dbType, string $doctrineType) : void
Parameters
- $dbType : string
- $doctrineType : string
Tags
releaseSavePoint()
Returns the SQL to release a savepoint.
public
releaseSavePoint(string $savepoint) : string
Parameters
- $savepoint : string
Return values
stringrollbackSavePoint()
Returns the SQL to rollback a savepoint.
public
rollbackSavePoint(string $savepoint) : string
Parameters
- $savepoint : string
Return values
stringsetEventManager()
Sets the EventManager used by the Platform.
public
setEventManager(EventManager $eventManager) : void
Parameters
- $eventManager : EventManager
Tags
supportsAlterTable()
Whether the platform supports altering tables.
public
supportsAlterTable() : bool
Tags
Return values
boolsupportsColumnCollation()
Does this platform support column collation?
public
supportsColumnCollation() : bool
Return values
boolsupportsColumnLengthIndexes()
Whether the platform supports indexes with column length definitions.
public
supportsColumnLengthIndexes() : bool
Return values
boolsupportsCommentOnStatement()
Whether this platform support the proprietary syntax "COMMENT ON asset".
public
supportsCommentOnStatement() : bool
Return values
boolsupportsCreateDropDatabase()
Whether this platform supports create database.
public
supportsCreateDropDatabase() : bool
Some databases don't allow to create and drop databases at all or only with certain tools.
Tags
Return values
boolsupportsForeignKeyConstraints()
Whether the platform supports foreign key constraints.
public
supportsForeignKeyConstraints() : bool
Tags
Return values
boolsupportsGettingAffectedRows()
Whether the platform supports getting the affected rows of a recent update/delete type query.
public
supportsGettingAffectedRows() : bool
Tags
Return values
boolsupportsIdentityColumns()
Whether the platform supports identity columns.
public
supportsIdentityColumns() : bool
Identity columns are columns that receive an auto-generated value from the database on insert of a row.
Return values
boolsupportsIndexes()
Whether the platform supports indexes.
public
supportsIndexes() : bool
Tags
Return values
boolsupportsInlineColumnComments()
Whether this platform support to add inline column comments as postfix.
public
supportsInlineColumnComments() : bool
Return values
boolsupportsLimitOffset()
Whether the database platform support offsets in modify limit clauses.
public
supportsLimitOffset() : bool
Tags
Return values
boolsupportsPartialIndexes()
Whether the platform supports partial indexes.
public
supportsPartialIndexes() : bool
Return values
boolsupportsPrimaryConstraints()
Whether the platform supports primary key constraints.
public
supportsPrimaryConstraints() : bool
Tags
Return values
boolsupportsReleaseSavepoints()
Whether the platform supports releasing savepoints.
public
supportsReleaseSavepoints() : bool
Return values
boolsupportsSavepoints()
Whether the platform supports savepoints.
public
supportsSavepoints() : bool
Return values
boolsupportsSchemas()
Whether the platform supports database schemas.
public
supportsSchemas() : bool
Return values
boolsupportsSequences()
Whether the platform supports sequences.
public
supportsSequences() : bool
Return values
boolsupportsTransactions()
Whether the platform supports transactions.
public
supportsTransactions() : bool
Tags
Return values
boolsupportsViews()
Whether this platform supports views.
public
supportsViews() : bool
Tags
Return values
boolusesSequenceEmulatedIdentityColumns()
Whether the platform emulates identity columns through sequences.
public
usesSequenceEmulatedIdentityColumns() : bool
Some platforms that do not support identity columns natively but support sequences can emulate identity columns by using sequences.
Tags
Return values
bool_getCommonIntegerTypeDeclarationSQL()
Returns the SQL snippet that declares common properties of an integer column.
protected
abstract _getCommonIntegerTypeDeclarationSQL(array<string|int, mixed> $column) : string
Parameters
- $column : array<string|int, mixed>
Return values
string_getCreateTableSQL()
Returns the SQL used to create a table.
protected
_getCreateTableSQL(string $name, array<string|int, array<string|int, mixed>> $columns[, array<string|int, mixed> $options = [] ]) : array<string|int, string>
Parameters
- $name : string
- $columns : array<string|int, array<string|int, mixed>>
- $options : array<string|int, mixed> = []
Return values
array<string|int, string>_getTransactionIsolationLevelSQL()
Returns the SQL for a given transaction isolation level Connection constant.
protected
_getTransactionIsolationLevelSQL(int $level) : string
Parameters
- $level : int
Tags
Return values
stringcreateReservedKeywordsList()
Creates an instance of the reserved keyword list of this platform.
protected
createReservedKeywordsList() : KeywordList
This method will become @abstract in DBAL 4.0.0.
Tags
Return values
KeywordListdoModifyLimitQuery()
Adds an platform-specific LIMIT clause to the query.
protected
doModifyLimitQuery(string $query, int|null $limit, int $offset) : string
Parameters
- $query : string
- $limit : int|null
- $offset : int
Return values
stringgetBinaryTypeDeclarationSQLSnippet()
Returns the SQL snippet used to declare a BINARY/VARBINARY column type.
protected
getBinaryTypeDeclarationSQLSnippet(int|false $length, bool $fixed) : string
Parameters
- $length : int|false
-
The length of the column.
- $fixed : bool
-
Whether the column length is fixed.
Tags
Return values
stringgetColumnComment()
Gets the comment of a passed column modified by potential doctrine type comment hints.
protected
getColumnComment(Column $column) : string|null
Parameters
- $column : Column
Tags
Return values
string|nullgetCommentOnTableSQL()
protected
getCommentOnTableSQL(string $tableName, string|null $comment) : string
Parameters
- $tableName : string
- $comment : string|null
Return values
stringgetCreateIndexSQLFlags()
Adds additional flags for index generation.
protected
getCreateIndexSQLFlags(Index $index) : string
Parameters
- $index : Index
Return values
stringgetDateArithmeticIntervalExpression()
Returns the SQL for a date arithmetic expression.
protected
getDateArithmeticIntervalExpression(string $date, string $operator, int|numeric-string $interval, string $unit) : string
Parameters
- $date : string
-
The column or literal representing a date to perform the arithmetic operation on.
- $operator : string
-
The arithmetic operator (+ or -).
- $interval : int|numeric-string
-
The interval that shall be calculated into the date.
- $unit : string
-
The unit of the interval that shall be calculated into the date. One of the DateIntervalUnit constants.
Tags
Return values
stringgetDropPrimaryKeySQL()
protected
getDropPrimaryKeySQL(string $table) : string
Parameters
- $table : string
Return values
stringgetLikeWildcardCharacters()
protected
getLikeWildcardCharacters() : string
Return values
stringgetPartialIndexSQL()
Adds condition for partial index.
protected
getPartialIndexSQL(Index $index) : string
Parameters
- $index : Index
Return values
stringgetPostAlterTableIndexForeignKeySQL()
protected
getPostAlterTableIndexForeignKeySQL(TableDiff $diff) : array<string|int, string>
Parameters
- $diff : TableDiff
Return values
array<string|int, string>getPostAlterTableRenameIndexForeignKeySQL()
protected
getPostAlterTableRenameIndexForeignKeySQL(TableDiff $diff) : array<string|int, string>
Parameters
- $diff : TableDiff
-
The table diff to gather the SQL for.
Return values
array<string|int, string>getPreAlterTableIndexForeignKeySQL()
protected
getPreAlterTableIndexForeignKeySQL(TableDiff $diff) : array<string|int, string>
Parameters
- $diff : TableDiff
Return values
array<string|int, string>getPreAlterTableRenameIndexForeignKeySQL()
protected
getPreAlterTableRenameIndexForeignKeySQL(TableDiff $diff) : array<string|int, string>
Parameters
- $diff : TableDiff
-
The table diff to gather the SQL for.
Return values
array<string|int, string>getRenameIndexSQL()
Returns the SQL for renaming an index on a table.
protected
getRenameIndexSQL(string $oldIndexName, Index $index, string $tableName) : array<string|int, string>
Parameters
- $oldIndexName : string
-
The name of the index to rename from.
- $index : Index
-
The definition of the index to rename to.
- $tableName : string
-
The table to rename the given index on.
Return values
array<string|int, string> —The sequence of SQL statements for renaming the given index.
getReservedKeywordsClass()
Returns the class name of the reserved keywords list.
protected
getReservedKeywordsClass() : string
Tags
Return values
stringgetVarcharTypeDeclarationSQLSnippet()
protected
getVarcharTypeDeclarationSQLSnippet(int|false $length, bool $fixed) : string
Parameters
- $length : int|false
- $fixed : bool
Tags
Return values
stringinitializeCommentedDoctrineTypes()
Initializes the Doctrine Type comments instance variable for in_array() checks.
protected
initializeCommentedDoctrineTypes() : void
Tags
initializeDoctrineTypeMappings()
Lazy load Doctrine Type Mappings.
protected
abstract initializeDoctrineTypeMappings() : void
onSchemaAlterTable()
protected
onSchemaAlterTable(TableDiff $diff, array<string|int, string> &$sql) : bool
Parameters
- $diff : TableDiff
- $sql : array<string|int, string>
Return values
boolonSchemaAlterTableAddColumn()
protected
onSchemaAlterTableAddColumn(Column $column, TableDiff $diff, array<string|int, mixed> &$columnSql) : bool
Parameters
Return values
boolonSchemaAlterTableChangeColumn()
protected
onSchemaAlterTableChangeColumn(ColumnDiff $columnDiff, TableDiff $diff, array<string|int, string> &$columnSql) : bool
Parameters
- $columnDiff : ColumnDiff
- $diff : TableDiff
- $columnSql : array<string|int, string>
Return values
boolonSchemaAlterTableRemoveColumn()
protected
onSchemaAlterTableRemoveColumn(Column $column, TableDiff $diff, array<string|int, string> &$columnSql) : bool
Parameters
Return values
boolonSchemaAlterTableRenameColumn()
protected
onSchemaAlterTableRenameColumn(string $oldColumnName, Column $column, TableDiff $diff, array<string|int, string> &$columnSql) : bool
Parameters
Return values
boolbuildCreateTableSQL()
private
buildCreateTableSQL(Table $table, bool $createIndexes, bool $createForeignKeys) : array<int, string>
Parameters
- $table : Table
- $createIndexes : bool
- $createForeignKeys : bool
Tags
Return values
array<int, string>buildPartitionOptions()
Build SQL for partition options.
private
buildPartitionOptions(array<string|int, mixed> $options) : string
Parameters
- $options : array<string|int, mixed>
Return values
stringbuildTableOptions()
Build SQL for table options
private
buildTableOptions(array<string|int, mixed> $options) : string
Parameters
- $options : array<string|int, mixed>
Return values
stringcolumnToArray()
private
columnToArray(Column $column) : array<string, mixed>
Parameters
- $column : Column
Return values
array<string, mixed> —An associative array with the name of the properties of the column being declared as array indexes.
engineSupportsForeignKeys()
private
engineSupportsForeignKeys(string $engine) : bool
Parameters
- $engine : string
Return values
boolgetDatabaseNameSQL()
private
getDatabaseNameSQL(string|null $databaseName) : string
Parameters
- $databaseName : string|null
Return values
stringgetPreAlterTableAlterIndexForeignKeySQL()
private
getPreAlterTableAlterIndexForeignKeySQL(TableDiff $diff) : array<string|int, string>
Parameters
- $diff : TableDiff
-
The table diff to gather the SQL for.
Tags
Return values
array<string|int, string>getPreAlterTableAlterPrimaryKeySQL()
private
getPreAlterTableAlterPrimaryKeySQL(TableDiff $diff, Index $index) : array<string|int, string>
Parameters
Tags
Return values
array<string|int, string>getRemainingForeignKeyConstraintsRequiringRenamedIndexes()
Returns the remaining foreign key constraints that require one of the renamed indexes.
private
getRemainingForeignKeyConstraintsRequiringRenamedIndexes(TableDiff $diff) : array<string|int, ForeignKeyConstraint>
"Remaining" here refers to the diff between the foreign keys currently defined in the associated table and the foreign keys to be removed.
Parameters
- $diff : TableDiff
-
The table diff to evaluate.
Return values
array<string|int, ForeignKeyConstraint>getUnsignedDeclaration()
Get unsigned declaration for a column.
private
getUnsignedDeclaration(array<string|int, mixed> $columnDef) : string
Parameters
- $columnDef : array<string|int, mixed>
Return values
stringindexAssetsByLowerCaseName()
private
indexAssetsByLowerCaseName(array<int, T> $assets) : array<string, T>
Parameters
- $assets : array<int, T>
Tags
Return values
array<string, T>initializeAllDoctrineTypeMappings()
Initializes Doctrine Type Mappings with the platform defaults and with all additional type mappings.
private
initializeAllDoctrineTypeMappings() : void