PHP Class Doctrine\DBAL\Platforms\PostgreSqlPlatform

Since: 2.0
Author: Roman Borschel ([email protected])
Inheritance: extends Doctrine\DBAL\Platforms\AbstractPlatform
Afficher le fichier Open project: doctrine/dbal Class Usage Examples

Méthodes publiques

Méthode Description
convertBooleans ( $item ) {@inheritDoc}
convertBooleansToDatabaseValue ( $item ) {@inheritDoc}
convertFromBoolean ( $item ) {@inheritDoc}
getAdvancedForeignKeyOptionsSQL ( Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey ) {@inheritDoc}
getAlterSequenceSQL ( Doctrine\DBAL\Schema\Sequence $sequence ) {@inheritDoc}
getAlterTableSQL ( Doctrine\DBAL\Schema\TableDiff $diff ) {@inheritDoc}
getBigIntTypeDeclarationSQL ( array $field ) {@inheritDoc}
getBinaryDefaultLength ( )
getBinaryMaxLength ( )
getBlobTypeDeclarationSQL ( array $field ) {@inheritDoc}
getBooleanTypeDeclarationSQL ( array $field ) {@inheritDoc}
getClobTypeDeclarationSQL ( array $field ) {@inheritDoc}
getCloseActiveDatabaseConnectionsSQL ( string $database ) : string Returns the SQL statement for closing currently active connections on the given database.
getCommentOnColumnSQL ( $tableName, $columnName, $comment )
getCreateDatabaseSQL ( $name ) {@inheritDoc}
getCreateSchemaSQL ( $schemaName ) {@inheritDoc}
getCreateSequenceSQL ( Doctrine\DBAL\Schema\Sequence $sequence ) {@inheritDoc}
getCreateViewSQL ( $name, $sql ) {@inheritDoc}
getDateDiffExpression ( $date1, $date2 ) {@inheritDoc}
getDateTimeTypeDeclarationSQL ( array $fieldDeclaration ) {@inheritDoc}
getDateTimeTzFormatString ( ) {@inheritDoc}
getDateTimeTzTypeDeclarationSQL ( array $fieldDeclaration ) {@inheritDoc}
getDateTypeDeclarationSQL ( array $fieldDeclaration ) {@inheritDoc}
getDefaultSchemaName ( )
getDisallowDatabaseConnectionsSQL ( string $database ) : string Returns the SQL statement for disallowing new connections on the given database.
getDropForeignKeySQL ( $foreignKey, $table ) {@inheritDoc}
getDropSequenceSQL ( $sequence ) {@inheritDoc}
getDropViewSQL ( $name ) {@inheritDoc}
getEmptyIdentityInsertSQL ( $quotedTableName, $quotedIdentifierColumnName ) {@inheritDoc}
getGuidExpression ( ) {@inheritDoc}
getGuidTypeDeclarationSQL ( array $field ) {@inheritDoc}
getIdentitySequenceName ( $tableName, $columnName )
getIntegerTypeDeclarationSQL ( array $field ) {@inheritDoc}
getListDatabasesSQL ( ) {@inheritDoc}
getListNamespacesSQL ( ) {@inheritDoc}
getListSequencesSQL ( $database ) {@inheritDoc}
getListTableColumnsSQL ( $table, $database = null ) {@inheritDoc}
getListTableConstraintsSQL ( $table ) {@inheritDoc}
getListTableForeignKeysSQL ( $table, $database = null ) {@inheritDoc}
getListTableIndexesSQL ( $table, $currentDatabase = null ) {@inheritDoc}
getListTablesSQL ( ) {@inheritDoc}
getListViewsSQL ( $database ) {@inheritDoc}
getLocateExpression ( $str, $substr, $startPos = false ) {@inheritDoc}
getName ( ) {@inheritDoc}
getNowExpression ( ) {@inheritDoc}
getReadLockSQL ( ) {@inheritDoc}
getRegexpExpression ( ) {@inheritDoc}
getSQLResultCasing ( $column ) {@inheritDoc}
getSequenceNextValSQL ( $sequenceName ) {@inheritDoc}
getSetTransactionIsolationSQL ( $level ) {@inheritDoc}
getSmallIntTypeDeclarationSQL ( array $field ) {@inheritDoc}
getSubstringExpression ( $value, $from, $length = null ) {@inheritDoc}
getTimeTypeDeclarationSQL ( array $fieldDeclaration ) {@inheritDoc}
getTruncateTableSQL ( $tableName, $cascade = false ) {@inheritDoc}
getVarcharMaxLength ( ) {@inheritDoc}
hasNativeGuidType ( ) {@inheritDoc}
prefersSequences ( ) {@inheritDoc}
quoteStringLiteral ( $str )
setUseBooleanTrueFalseStrings ( boolean $flag ) PostgreSQL has different behavior with some drivers with regard to how booleans have to be handled.
supportsCommentOnStatement ( ) {@inheritDoc}
supportsIdentityColumns ( ) {@inheritDoc}
supportsPartialIndexes ( )
supportsSchemas ( ) {@inheritDoc}
supportsSequences ( ) {@inheritDoc}
usesSequenceEmulatedIdentityColumns ( )

Méthodes protégées

Méthode Description
_getCommonIntegerTypeDeclarationSQL ( array $columnDef ) {@inheritDoc}
_getCreateTableSQL ( $tableName, array $columns, array $options = [] ) {@inheritDoc}
getBinaryTypeDeclarationSQLSnippet ( $length, $fixed )
getDateArithmeticIntervalExpression ( $date, $operator, $interval, $unit )
getRenameIndexSQL ( $oldIndexName, Doctrine\DBAL\Schema\Index $index, $tableName )
getReservedKeywordsClass ( ) {@inheritDoc}
getVarcharTypeDeclarationSQLSnippet ( $length, $fixed ) {@inheritDoc}
initializeDoctrineTypeMappings ( ) {@inheritDoc}

Private Methods

Méthode Description
convertSingleBooleanValue ( mixed $value, callable $callback ) : mixed Converts a single boolean value.
doConvertBooleans ( mixed $item, callable $callback ) : mixed Converts one or multiple boolean values.
getSequenceCacheSQL ( Doctrine\DBAL\Schema\Sequence $sequence ) : string Cache definition for sequences
getTableWhereClause ( string $table, string $classAlias = 'c', string $namespaceAlias = 'n' ) : string
isUnchangedBinaryColumn ( Doctrine\DBAL\Schema\ColumnDiff $columnDiff ) : boolean Checks whether a given column diff is a logically unchanged binary type column.

Method Details

_getCommonIntegerTypeDeclarationSQL() protected méthode

{@inheritDoc}
protected _getCommonIntegerTypeDeclarationSQL ( array $columnDef )
$columnDef array

_getCreateTableSQL() protected méthode

{@inheritDoc}
protected _getCreateTableSQL ( $tableName, array $columns, array $options = [] )
$columns array
$options array

convertBooleans() public méthode

Postgres wants boolean values converted to the strings 'true'/'false'.
public convertBooleans ( $item )

convertBooleansToDatabaseValue() public méthode

{@inheritDoc}

convertFromBoolean() public méthode

{@inheritDoc}
public convertFromBoolean ( $item )

getAdvancedForeignKeyOptionsSQL() public méthode

{@inheritDoc}
public getAdvancedForeignKeyOptionsSQL ( Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey )
$foreignKey Doctrine\DBAL\Schema\ForeignKeyConstraint

getAlterSequenceSQL() public méthode

{@inheritDoc}
public getAlterSequenceSQL ( Doctrine\DBAL\Schema\Sequence $sequence )
$sequence Doctrine\DBAL\Schema\Sequence

getAlterTableSQL() public méthode

{@inheritDoc}
public getAlterTableSQL ( Doctrine\DBAL\Schema\TableDiff $diff )
$diff Doctrine\DBAL\Schema\TableDiff

getBigIntTypeDeclarationSQL() public méthode

{@inheritDoc}
public getBigIntTypeDeclarationSQL ( array $field )
$field array

getBinaryDefaultLength() public méthode

getBinaryMaxLength() public méthode

public getBinaryMaxLength ( )

getBinaryTypeDeclarationSQLSnippet() protected méthode

protected getBinaryTypeDeclarationSQLSnippet ( $length, $fixed )

getBlobTypeDeclarationSQL() public méthode

{@inheritDoc}
public getBlobTypeDeclarationSQL ( array $field )
$field array

getBooleanTypeDeclarationSQL() public méthode

{@inheritDoc}
public getBooleanTypeDeclarationSQL ( array $field )
$field array

getClobTypeDeclarationSQL() public méthode

{@inheritDoc}
public getClobTypeDeclarationSQL ( array $field )
$field array

getCloseActiveDatabaseConnectionsSQL() public méthode

This is useful to force DROP DATABASE operations which could fail because of active connections.
public getCloseActiveDatabaseConnectionsSQL ( string $database ) : string
$database string The name of the database to close currently active connections for.
Résultat string

getCommentOnColumnSQL() public méthode

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

getCreateDatabaseSQL() public méthode

{@inheritDoc}
public getCreateDatabaseSQL ( $name )

getCreateSchemaSQL() public méthode

{@inheritDoc}
public getCreateSchemaSQL ( $schemaName )

getCreateSequenceSQL() public méthode

{@inheritDoc}
public getCreateSequenceSQL ( Doctrine\DBAL\Schema\Sequence $sequence )
$sequence Doctrine\DBAL\Schema\Sequence

getCreateViewSQL() public méthode

{@inheritDoc}
public getCreateViewSQL ( $name, $sql )

getDateArithmeticIntervalExpression() protected méthode

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

getDateDiffExpression() public méthode

{@inheritDoc}
public getDateDiffExpression ( $date1, $date2 )

getDateTimeTypeDeclarationSQL() public méthode

{@inheritDoc}
public getDateTimeTypeDeclarationSQL ( array $fieldDeclaration )
$fieldDeclaration array

getDateTimeTzFormatString() public méthode

{@inheritDoc}

getDateTimeTzTypeDeclarationSQL() public méthode

{@inheritDoc}
public getDateTimeTzTypeDeclarationSQL ( array $fieldDeclaration )
$fieldDeclaration array

getDateTypeDeclarationSQL() public méthode

{@inheritDoc}
public getDateTypeDeclarationSQL ( array $fieldDeclaration )
$fieldDeclaration array

getDefaultSchemaName() public méthode

getDisallowDatabaseConnectionsSQL() public méthode

This is useful to force DROP DATABASE operations which could fail because of active connections.
public getDisallowDatabaseConnectionsSQL ( string $database ) : string
$database string The name of the database to disallow new connections for.
Résultat string

getDropForeignKeySQL() public méthode

{@inheritDoc}
public getDropForeignKeySQL ( $foreignKey, $table )

getDropSequenceSQL() public méthode

{@inheritDoc}
public getDropSequenceSQL ( $sequence )

getDropViewSQL() public méthode

{@inheritDoc}
public getDropViewSQL ( $name )

getEmptyIdentityInsertSQL() public méthode

{@inheritDoc}
public getEmptyIdentityInsertSQL ( $quotedTableName, $quotedIdentifierColumnName )

getGuidExpression() public méthode

{@inheritDoc}
public getGuidExpression ( )

getGuidTypeDeclarationSQL() public méthode

{@inheritDoc}
public getGuidTypeDeclarationSQL ( array $field )
$field array

getIdentitySequenceName() public méthode

public getIdentitySequenceName ( $tableName, $columnName )

getIntegerTypeDeclarationSQL() public méthode

{@inheritDoc}
public getIntegerTypeDeclarationSQL ( array $field )
$field array

getListDatabasesSQL() public méthode

{@inheritDoc}
public getListDatabasesSQL ( )

getListNamespacesSQL() public méthode

{@inheritDoc}

getListSequencesSQL() public méthode

{@inheritDoc}
public getListSequencesSQL ( $database )

getListTableColumnsSQL() public méthode

{@inheritDoc}
public getListTableColumnsSQL ( $table, $database = null )

getListTableConstraintsSQL() public méthode

{@inheritDoc}
public getListTableConstraintsSQL ( $table )

getListTableForeignKeysSQL() public méthode

{@inheritDoc}
public getListTableForeignKeysSQL ( $table, $database = null )

getListTableIndexesSQL() public méthode

{@inheritDoc}
public getListTableIndexesSQL ( $table, $currentDatabase = null )

getListTablesSQL() public méthode

{@inheritDoc}
public getListTablesSQL ( )

getListViewsSQL() public méthode

{@inheritDoc}
public getListViewsSQL ( $database )

getLocateExpression() public méthode

{@inheritDoc}
public getLocateExpression ( $str, $substr, $startPos = false )

getName() public méthode

{@inheritDoc}
public getName ( )

getNowExpression() public méthode

{@inheritDoc}
public getNowExpression ( )

getReadLockSQL() public méthode

{@inheritDoc}
public getReadLockSQL ( )

getRegexpExpression() public méthode

{@inheritDoc}
public getRegexpExpression ( )

getRenameIndexSQL() protected méthode

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

getReservedKeywordsClass() protected méthode

{@inheritDoc}
protected getReservedKeywordsClass ( )

getSQLResultCasing() public méthode

PostgreSQL returns all column names in SQL result sets in lowercase.
public getSQLResultCasing ( $column )

getSequenceNextValSQL() public méthode

{@inheritDoc}
public getSequenceNextValSQL ( $sequenceName )

getSetTransactionIsolationSQL() public méthode

{@inheritDoc}
public getSetTransactionIsolationSQL ( $level )

getSmallIntTypeDeclarationSQL() public méthode

{@inheritDoc}
public getSmallIntTypeDeclarationSQL ( array $field )
$field array

getSubstringExpression() public méthode

{@inheritDoc}
public getSubstringExpression ( $value, $from, $length = null )

getTimeTypeDeclarationSQL() public méthode

{@inheritDoc}
public getTimeTypeDeclarationSQL ( array $fieldDeclaration )
$fieldDeclaration array

getTruncateTableSQL() public méthode

{@inheritDoc}
public getTruncateTableSQL ( $tableName, $cascade = false )

getVarcharMaxLength() public méthode

{@inheritDoc}
public getVarcharMaxLength ( )

getVarcharTypeDeclarationSQLSnippet() protected méthode

{@inheritDoc}
protected getVarcharTypeDeclarationSQLSnippet ( $length, $fixed )

hasNativeGuidType() public méthode

{@inheritDoc}
public hasNativeGuidType ( )

initializeDoctrineTypeMappings() protected méthode

{@inheritDoc}

prefersSequences() public méthode

{@inheritDoc}
public prefersSequences ( )

quoteStringLiteral() public méthode

public quoteStringLiteral ( $str )

setUseBooleanTrueFalseStrings() public méthode

Enables use of 'true'/'false' or otherwise 1 and 0 instead.

supportsCommentOnStatement() public méthode

{@inheritDoc}

supportsIdentityColumns() public méthode

{@inheritDoc}

supportsPartialIndexes() public méthode

supportsSchemas() public méthode

{@inheritDoc}
public supportsSchemas ( )

supportsSequences() public méthode

{@inheritDoc}
public supportsSequences ( )

usesSequenceEmulatedIdentityColumns() public méthode