class PgsqlPlatform extends DefaultPlatform
Postgresql PlatformInterface implementation.
Methods
__construct(ConnectionInterface $con = null)
Default constructor. |
from DefaultPlatform | |
getObjectBuilderClass($type) | from DefaultPlatform | |
setConnection(ConnectionInterface $con = null)
Sets the database connection to use for this Platform class. |
from DefaultPlatform | |
ConnectionInterface |
getConnection()
Returns the database connection to use for this Platform class. |
from DefaultPlatform |
string|null |
getBuilderClass($type $type)
Returns a platform specific builder class if exists. |
from DefaultPlatform |
setGeneratorConfig(GeneratorConfigInterface $config)
Sets the GeneratorConfigInterface to use in the parsing. |
from DefaultPlatform | |
string |
getDatabaseType()
Returns the short name of the database type that this platform represents. |
from DefaultPlatform |
int |
getMaxColumnNameLength()
Returns the max column length supported by the db. |
|
string |
getNativeIdMethod()
Returns the native IdMethod (sequence|identity) |
|
isNativeIdMethodAutoIncrement() | from DefaultPlatform | |
Domain |
getDomainForType(string $mappingType)
Returns the database specific domain for a mapping type. |
from DefaultPlatform |
string. |
getNullString($notNull)
Returns the NOT NULL string for the configured RDBMS. |
from DefaultPlatform |
string. |
getAutoIncrement()
Returns the auto increment strategy for the configured RDBMS. |
|
string |
getSequenceName(Table $table)
Override to provide sequence names that conform to postgres' standard when no id-method-parameter specified. |
|
string |
getAddTablesDDL(Database $database)
Returns the DDL SQL to add the tables of a database together with index and foreign keys |
|
string |
getBeginDDL()
Gets the requests to execute at the beginning of a DDL file |
from DefaultPlatform |
string |
getEndDDL()
Gets the requests to execute at the end of a DDL file |
from DefaultPlatform |
string |
getDropTableDDL(Table $table)
Builds the DDL SQL to drop a table |
|
string |
getAddTableDDL(Table $table)
Builds the DDL SQL to add a table without index and foreign keys |
|
string |
getColumnDDL(Column $col)
Builds the DDL SQL for a Column object. |
|
string |
getColumnDefaultValueDDL(Column $col)
Returns the SQL for the default value of a Column object |
from DefaultPlatform |
string |
getColumnListDDL(Column[]|string[] $columns, string $delimiter = ',')
Creates a delimiter-delimited string list of column names, quoted using quoteIdentifier(). |
from DefaultPlatform |
string |
getPrimaryKeyName(Table $table)
Returns the name of a table primary key. |
|
string |
getPrimaryKeyDDL(Table $table)
Returns the SQL for the primary key of a Table object. |
from DefaultPlatform |
string |
getDropPrimaryKeyDDL(Table $table)
Returns the DDL SQL to drop the primary key of a table. |
from DefaultPlatform |
string |
getAddPrimaryKeyDDL(Table $table)
Returns the DDL SQL to add the primary key of a table. |
from DefaultPlatform |
string |
getAddIndicesDDL(Table $table)
Returns the DDL SQL to add the indices of a table. |
from DefaultPlatform |
string |
getAddIndexDDL(Index $index)
Returns the DDL SQL to add an Index. |
from DefaultPlatform |
string |
getDropIndexDDL(Index $index)
Overrides the implementation from DefaultPlatform |
|
string |
getIndexDDL(Index $index)
Builds the DDL SQL for an Index object. |
from DefaultPlatform |
string |
getUniqueDDL(Unique $unique)
Builds the DDL SQL for a Unique constraint object. |
|
string |
getAddForeignKeysDDL(Table $table)
Builds the DDL SQL to add the foreign keys of a table. |
from DefaultPlatform |
string |
getAddForeignKeyDDL(ForeignKey $fk)
Builds the DDL SQL to add a foreign key. |
from DefaultPlatform |
string |
getDropForeignKeyDDL(ForeignKey $fk)
Builds the DDL SQL to drop a foreign key. |
from DefaultPlatform |
string |
getForeignKeyDDL(ForeignKey $fk)
Builds the DDL SQL for a ForeignKey object. |
from DefaultPlatform |
getCommentLineDDL($comment) | from DefaultPlatform | |
getCommentBlockDDL($comment) | from DefaultPlatform | |
string |
getModifyDatabaseDDL(DatabaseDiff $databaseDiff)
Builds the DDL SQL to modify a database based on a DatabaseDiff instance |
from DefaultPlatform |
string |
getRenameTableDDL($fromTableName, $toTableName)
Builds the DDL SQL to rename a table |
from DefaultPlatform |
string |
getModifyTableDDL(TableDiff $tableDiff)
Builds the DDL SQL to alter a table based on a TableDiff instance |
from DefaultPlatform |
string |
getModifyTableColumnsDDL(TableDiff $tableDiff)
Builds the DDL SQL to alter a table based on a TableDiff instance |
from DefaultPlatform |
string |
getModifyTablePrimaryKeyDDL(TableDiff $tableDiff)
Builds the DDL SQL to alter a table's primary key based on a TableDiff instance |
from DefaultPlatform |
string |
getModifyTableIndicesDDL(TableDiff $tableDiff)
Builds the DDL SQL to alter a table's indices based on a TableDiff instance |
from DefaultPlatform |
string |
getModifyTableForeignKeysDDL(TableDiff $tableDiff)
Builds the DDL SQL to alter a table's foreign keys based on a TableDiff instance |
from DefaultPlatform |
string |
getRemoveColumnDDL(Column $column)
Builds the DDL SQL to remove a column |
from DefaultPlatform |
string |
getRenameColumnDDL($fromColumn, $toColumn)
Builds the DDL SQL to rename a column |
from DefaultPlatform |
string |
getModifyColumnDDL(ColumnDiff $columnDiff)
Overrides the implementation from DefaultPlatform |
|
string |
getModifyColumnsDDL($columnDiffs)
Overrides the implementation from DefaultPlatform |
|
string |
getAddColumnDDL(Column $column)
Builds the DDL SQL to remove a column |
from DefaultPlatform |
string |
getAddColumnsDDL($columns)
Overrides the implementation from DefaultPlatform |
|
boolean |
hasSize(string $sqlType)
Returns if the RDBMS-specific SQL type has a size attribute. |
|
boolean |
hasScale(string $sqlType)
Returns if the RDBMS-specific SQL type has a scale attribute. |
from DefaultPlatform |
string |
quote(string $text)
Quote and escape needed characters in the string for underlying RDBMS. |
from DefaultPlatform |
string |
quoteIdentifier(string $text)
Quotes identifiers used in database SQL. |
from DefaultPlatform |
setIdentifierQuoting($enabled = true) | from DefaultPlatform | |
getIdentifierQuoting() | from DefaultPlatform | |
boolean |
supportsNativeDeleteTrigger()
Whether RDBMS supports native ON DELETE triggers (e.g. |
|
boolean |
supportsInsertNullPk()
Whether RDBMS supports INSERT null values in autoincremented primary keys |
from DefaultPlatform |
boolean |
hasStreamBlobImpl()
Whether the underlying PDO driver for this platform returns BLOB columns as streams (instead of strings). |
|
boolean | supportsSchemas() | |
boolean | supportsMigrations() | from DefaultPlatform |
boolean |
supportsVarcharWithoutSize()
Whether RDBMS supports VARCHAR without explicit size |
|
mixed |
getBooleanString($b)
Returns the Boolean value for the RDBMS. |
|
getPhpArrayString($stringValue) | from DefaultPlatform | |
string |
getTimestampFormatter()
Gets the preferred timestamp formatter for setting date/time values. |
from DefaultPlatform |
string |
getTimeFormatter()
Gets the preferred time formatter for setting date/time values. |
from DefaultPlatform |
string |
getDateFormatter()
Gets the preferred date formatter for setting date/time values. |
from DefaultPlatform |
getColumnBindingPHP($column, $identifier, $columnValueAccessor, $tab = ' ')
Get the PHP snippet for binding a value to a column. |
from DefaultPlatform | |
getIdentifierPhp($columnValueMutator, $connectionVariableName = '$con', $sequenceName = '', $tab = ' ')
Get the PHP snippet for getting a Pk from the database. |
||
getAddSchemasDDL(Database $database) | ||
getAddSchemaDDL(Table $table) | ||
getUseSchemaDDL(Table $table) | ||
getResetSchemaDDL(Table $table) |
Details
in DefaultPlatform at line 59
public
__construct(ConnectionInterface $con = null)
Default constructor.
in DefaultPlatform at line 68
public
getObjectBuilderClass($type)
in DefaultPlatform at line 78
public
setConnection(ConnectionInterface $con = null)
Sets the database connection to use for this Platform class.
in DefaultPlatform at line 88
public ConnectionInterface
getConnection()
Returns the database connection to use for this Platform class.
in DefaultPlatform at line 100
public string|null
getBuilderClass($type $type)
Returns a platform specific builder class if exists.
in DefaultPlatform at line 116
public
setGeneratorConfig(GeneratorConfigInterface $config)
Sets the GeneratorConfigInterface to use in the parsing.
in DefaultPlatform at line 167
public string
getDatabaseType()
Returns the short name of the database type that this platform represents.
For example MysqlPlatform->getDatabaseType() returns 'mysql'.
at line 68
public int
getMaxColumnNameLength()
Returns the max column length supported by the db.
at line 58
public string
getNativeIdMethod()
Returns the native IdMethod (sequence|identity)
in DefaultPlatform at line 196
public
isNativeIdMethodAutoIncrement()
in DefaultPlatform at line 207
public Domain
getDomainForType(string $mappingType)
Returns the database specific domain for a mapping type.
in DefaultPlatform at line 221
public string.
getNullString($notNull)
Returns the NOT NULL string for the configured RDBMS.
at line 63
public string.
getAutoIncrement()
Returns the auto increment strategy for the configured RDBMS.
at line 95
public string
getSequenceName(Table $table)
Override to provide sequence names that conform to postgres' standard when no id-method-parameter specified.
at line 195
public string
getAddTablesDDL(Database $database)
Returns the DDL SQL to add the tables of a database together with index and foreign keys
in DefaultPlatform at line 296
public string
getBeginDDL()
Gets the requests to execute at the beginning of a DDL file
in DefaultPlatform at line 305
public string
getEndDDL()
Gets the requests to execute at the end of a DDL file
at line 286
public string
getDropTableDDL(Table $table)
Builds the DDL SQL to drop a table
at line 213
public string
getAddTableDDL(Table $table)
Builds the DDL SQL to add a table without index and foreign keys
at line 307
public string
getColumnDDL(Column $col)
Builds the DDL SQL for a Column object.
in DefaultPlatform at line 393
public string
getColumnDefaultValueDDL(Column $col)
Returns the SQL for the default value of a Column object
in DefaultPlatform at line 436
public string
getColumnListDDL(Column[]|string[] $columns, string $delimiter = ',')
Creates a delimiter-delimited string list of column names, quoted using quoteIdentifier().
at line 300
public string
getPrimaryKeyName(Table $table)
Returns the name of a table primary key.
in DefaultPlatform at line 466
public string
getPrimaryKeyDDL(Table $table)
Returns the SQL for the primary key of a Table object.
in DefaultPlatform at line 479
public string
getDropPrimaryKeyDDL(Table $table)
Returns the DDL SQL to drop the primary key of a table.
in DefaultPlatform at line 497
public string
getAddPrimaryKeyDDL(Table $table)
Returns the DDL SQL to add the primary key of a table.
in DefaultPlatform at line 515
public string
getAddIndicesDDL(Table $table)
Returns the DDL SQL to add the indices of a table.
in DefaultPlatform at line 531
public string
getAddIndexDDL(Index $index)
Returns the DDL SQL to add an Index.
at line 464
public string
getDropIndexDDL(Index $index)
Overrides the implementation from DefaultPlatform
in DefaultPlatform at line 568
public string
getIndexDDL(Index $index)
Builds the DDL SQL for an Index object.
at line 335
public string
getUniqueDDL(Unique $unique)
Builds the DDL SQL for a Unique constraint object.
in DefaultPlatform at line 594
public string
getAddForeignKeysDDL(Table $table)
Builds the DDL SQL to add the foreign keys of a table.
in DefaultPlatform at line 610
public string
getAddForeignKeyDDL(ForeignKey $fk)
Builds the DDL SQL to add a foreign key.
in DefaultPlatform at line 631
public string
getDropForeignKeyDDL(ForeignKey $fk)
Builds the DDL SQL to drop a foreign key.
in DefaultPlatform at line 650
public string
getForeignKeyDDL(ForeignKey $fk)
Builds the DDL SQL for a ForeignKey object.
in DefaultPlatform at line 676
public
getCommentLineDDL($comment)
in DefaultPlatform at line 684
public
getCommentBlockDDL($comment)
in DefaultPlatform at line 701
public string
getModifyDatabaseDDL(DatabaseDiff $databaseDiff)
Builds the DDL SQL to modify a database based on a DatabaseDiff instance
in DefaultPlatform at line 735
public string
getRenameTableDDL($fromTableName, $toTableName)
Builds the DDL SQL to rename a table
in DefaultPlatform at line 753
public string
getModifyTableDDL(TableDiff $tableDiff)
Builds the DDL SQL to alter a table based on a TableDiff instance
in DefaultPlatform at line 818
public string
getModifyTableColumnsDDL(TableDiff $tableDiff)
Builds the DDL SQL to alter a table based on a TableDiff instance
in DefaultPlatform at line 847
public string
getModifyTablePrimaryKeyDDL(TableDiff $tableDiff)
Builds the DDL SQL to alter a table's primary key based on a TableDiff instance
in DefaultPlatform at line 865
public string
getModifyTableIndicesDDL(TableDiff $tableDiff)
Builds the DDL SQL to alter a table's indices based on a TableDiff instance
in DefaultPlatform at line 892
public string
getModifyTableForeignKeysDDL(TableDiff $tableDiff)
Builds the DDL SQL to alter a table's foreign keys based on a TableDiff instance
in DefaultPlatform at line 918
public string
getRemoveColumnDDL(Column $column)
Builds the DDL SQL to remove a column
in DefaultPlatform at line 935
public string
getRenameColumnDDL($fromColumn, $toColumn)
Builds the DDL SQL to rename a column
at line 373
public string
getModifyColumnDDL(ColumnDiff $columnDiff)
Overrides the implementation from DefaultPlatform
at line 430
public string
getModifyColumnsDDL($columnDiffs)
Overrides the implementation from DefaultPlatform
in DefaultPlatform at line 1004
public string
getAddColumnDDL(Column $column)
Builds the DDL SQL to remove a column
at line 447
public string
getAddColumnsDDL($columns)
Overrides the implementation from DefaultPlatform
at line 351
public boolean
hasSize(string $sqlType)
Returns if the RDBMS-specific SQL type has a size attribute.
in DefaultPlatform at line 1065
public boolean
hasScale(string $sqlType)
Returns if the RDBMS-specific SQL type has a scale attribute.
in DefaultPlatform at line 1075
public string
quote(string $text)
Quote and escape needed characters in the string for underlying RDBMS.
in DefaultPlatform at line 1103
public string
quoteIdentifier(string $text)
Quotes identifiers used in database SQL.
in DefaultPlatform at line 1108
public
setIdentifierQuoting($enabled = true)
in DefaultPlatform at line 1113
public
getIdentifierQuoting()
at line 82
public boolean
supportsNativeDeleteTrigger()
Whether RDBMS supports native ON DELETE triggers (e.g.
ON DELETE CASCADE).
in DefaultPlatform at line 1131
public boolean
supportsInsertNullPk()
Whether RDBMS supports INSERT null values in autoincremented primary keys
at line 356
public boolean
hasStreamBlobImpl()
Whether the underlying PDO driver for this platform returns BLOB columns as streams (instead of strings).
at line 346
public boolean
supportsSchemas()
in DefaultPlatform at line 1157
public boolean
supportsMigrations()
at line 361
public boolean
supportsVarcharWithoutSize()
Whether RDBMS supports VARCHAR without explicit size
at line 73
public mixed
getBooleanString($b)
Returns the Boolean value for the RDBMS.
This value should match the Boolean value that is set
when using Propel's PreparedStatement::setBoolean().
This function is used to set default column values when building
SQL.
in DefaultPlatform at line 1197
public
getPhpArrayString($stringValue)
in DefaultPlatform at line 1221
public string
getTimestampFormatter()
Gets the preferred timestamp formatter for setting date/time values.
in DefaultPlatform at line 1230
public string
getTimeFormatter()
Gets the preferred time formatter for setting date/time values.
in DefaultPlatform at line 1239
public string
getDateFormatter()
Gets the preferred date formatter for setting date/time values.
in DefaultPlatform at line 1249
public
getColumnBindingPHP($column, $identifier, $columnValueAccessor, $tab = ' ')
Get the PHP snippet for binding a value to a column.
Warning: duplicates logic from AdapterInterface::bindValue().
Any code modification here must be ported there.
at line 485
public
getIdentifierPhp($columnValueMutator, $connectionVariableName = '$con', $sequenceName = '', $tab = ' ')
Get the PHP snippet for getting a Pk from the database.
Warning: duplicates logic from PgsqlAdapter::getId().
Any code modification here must be ported there.