class DefaultPlatform implements PropelPlatformInterface
Default implementation for the Platform interface.
Methods
__construct(PDO $con = null)
Default constructor. |
||
setConnection(PDO $con = null)
Set the database connection to use for this Platform class. |
||
PDO |
getConnection()
Returns the database connection to use for this Platform class. |
|
setGeneratorConfig(GeneratorConfig $config)
Sets the GeneratorConfig to use in the parsing. |
||
string |
getDatabaseType()
Returns the short name of the database type that this platform represents. |
|
int |
getMaxColumnNameLength()
Returns the max column length supported by the db. |
|
string |
getNativeIdMethod()
Returns the native IdMethod (sequence|identity) |
|
Domain |
getDomainForType(string $propelType)
Returns the db specific domain for a propelType. |
|
string | getNullString($notNull) | |
The | getAutoIncrement() | |
string |
getSequenceName(Table $table)
Gets the name to use for creating a sequence for a table. |
|
string |
getAddTablesDDL(Database $database)
Builds 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 |
|
string |
getEndDDL()
Gets the requests to execute at the end of a DDL file |
|
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 |
|
string |
getColumnListDDL($columns, $delimiter = ',')
Creates a delimiter-delimited string list of column names, quoted using quoteIdentifier(). |
|
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 |
|
string |
getDropPrimaryKeyDDL(Table $table)
Builds the DDL SQL to drop the primary key of a table. |
|
string |
getAddPrimaryKeyDDL(Table $table)
Builds the DDL SQL to add the primary key of a table. |
|
string |
getAddIndicesDDL(Table $table)
Builds the DDL SQL to add the indices of a table. |
|
string |
getAddIndexDDL(Index $index)
Builds the DDL SQL to add an Index. |
|
string |
getDropIndexDDL(Index $index)
Builds the DDL SQL to drop an Index. |
|
string |
getIndexDDL(Index $index)
Builds the DDL SQL for an Index object. |
|
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. |
|
string |
getAddForeignKeyDDL(ForeignKey $fk)
Builds the DDL SQL to add a foreign key. |
|
string |
getDropForeignKeyDDL(ForeignKey $fk)
Builds the DDL SQL to drop a foreign key. |
|
string |
getForeignKeyDDL(ForeignKey $fk)
Builds the DDL SQL for a ForeignKey object. |
|
getCommentLineDDL($comment) | ||
getCommentBlockDDL($comment) | ||
string |
getModifyDatabaseDDL(PropelDatabaseDiff $databaseDiff)
Builds the DDL SQL to modify a database based on a PropelDatabaseDiff instance |
|
string |
getRenameTableDDL($fromTableName, $toTableName)
Builds the DDL SQL to rename a table |
|
string |
getModifyTableDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table based on a PropelTableDiff instance |
|
string |
getModifyTableColumnsDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table based on a PropelTableDiff instance |
|
string |
getModifyTablePrimaryKeyDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table's primary key based on a PropelTableDiff instance |
|
string |
getModifyTableIndicesDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table's indices based on a PropelTableDiff instance |
|
string |
getModifyTableForeignKeysDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table's foreign keys based on a PropelTableDiff instance |
|
string |
getRemoveColumnDDL(Column $column)
Builds the DDL SQL to remove a column |
|
string |
getRenameColumnDDL($fromColumn, $toColumn)
Builds the DDL SQL to rename a column |
|
string |
getModifyColumnDDL(PropelColumnDiff $columnDiff)
Builds the DDL SQL to modify a column |
|
string |
getModifyColumnsDDL($columnDiffs)
Builds the DDL SQL to modify a list of columns |
|
string |
getAddColumnDDL(Column $column)
Builds the DDL SQL to remove a column |
|
string |
getAddColumnsDDL($columns)
Builds the DDL SQL to remove a list of columns |
|
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. |
|
string |
quote(string $text)
Quote and escape needed characters in the string for unerlying RDBMS. |
|
string |
quoteIdentifier(string $text)
Quotes identifiers used in database SQL. |
|
setIdentifierQuoting($enabled = true) | ||
getIdentifierQuoting() | ||
boolean |
supportsNativeDeleteTrigger()
Whether RDBMS supports native ON DELETE triggers (e.g. |
|
boolean |
supportsInsertNullPk()
Whether RDBMS supports INSERT null values in autoincremented primary keys |
|
boolean |
hasStreamBlobImpl()
Whether the underlying PDO driver for this platform returns BLOB columns as streams (instead of strings). |
|
supportsSchemas() | ||
mixed |
getBooleanString($b)
Returns the boolean value for the RDBMS. |
|
string |
getTimestampFormatter()
Gets the preferred timestamp formatter for setting date/time values. |
|
string |
getTimeFormatter()
Gets the preferred time formatter for setting date/time values. |
|
string |
getDateFormatter()
Gets the preferred date formatter for setting date/time values. |
Details
at line 48
public
__construct(PDO $con = null)
Default constructor.
at line 58
public
setConnection(PDO $con = null)
Set the database connection to use for this Platform class.
at line 67
public PDO
getConnection()
Returns the database connection to use for this Platform class.
at line 77
public
setGeneratorConfig(GeneratorConfig $config)
Sets the GeneratorConfig to use in the parsing.
at line 127
public string
getDatabaseType()
Returns the short name of the database type that this platform represents.
For example MysqlPlatform->getDatabaseType() returns 'mysql'.
at line 139
public int
getMaxColumnNameLength()
Returns the max column length supported by the db.
at line 149
public string
getNativeIdMethod()
Returns the native IdMethod (sequence|identity)
at line 160
public Domain
getDomainForType(string $propelType)
Returns the db specific domain for a propelType.
at line 172
public string
getNullString($notNull)
at line 180
public The
getAutoIncrement()
at line 195
public string
getSequenceName(Table $table)
Gets the name to use for creating a sequence for a table.
This will create a new name or use one specified in an id-method-parameter
tag, if specified.
at line 225
public string
getAddTablesDDL(Database $database)
Builds the DDL SQL to add the tables of a database together with index and foreign keys
at line 244
public string
getBeginDDL()
Gets the requests to execute at the beginning of a DDL file
at line 253
public string
getEndDDL()
Gets the requests to execute at the end of a DDL file
at line 261
public string
getDropTableDDL(Table $table)
Builds the DDL SQL to drop a table
at line 274
public string
getAddTableDDL(Table $table)
Builds the DDL SQL to add a table without index and foreign keys
at line 312
public string
getColumnDDL(Column $col)
Builds the DDL SQL for a Column object.
at line 340
public string
getColumnDefaultValueDDL(Column $col)
Returns the SQL for the default value of a Column object
at line 376
public string
getColumnListDDL($columns, $delimiter = ',')
Creates a delimiter-delimited string list of column names, quoted using quoteIdentifier().
at line 392
public string
getPrimaryKeyName(Table $table)
Returns the name of a table primary key
at line 402
public string
getPrimaryKeyDDL(Table $table)
Returns the SQL for the primary key of a Table object
at line 415
public string
getDropPrimaryKeyDDL(Table $table)
Builds the DDL SQL to drop the primary key of a table.
at line 432
public string
getAddPrimaryKeyDDL(Table $table)
Builds the DDL SQL to add the primary key of a table.
at line 449
public string
getAddIndicesDDL(Table $table)
Builds the DDL SQL to add the indices of a table.
at line 464
public string
getAddIndexDDL(Index $index)
Builds the DDL SQL to add an Index.
at line 483
public string
getDropIndexDDL(Index $index)
Builds the DDL SQL to drop an Index.
at line 499
public string
getIndexDDL(Index $index)
Builds the DDL SQL for an Index object.
at line 514
public string
getUniqueDDL(Unique $unique)
Builds the DDL SQL for a Unique constraint object.
at line 525
public string
getAddForeignKeysDDL(Table $table)
Builds the DDL SQL to add the foreign keys of a table.
at line 540
public string
getAddForeignKeyDDL(ForeignKey $fk)
Builds the DDL SQL to add a foreign key.
at line 560
public string
getDropForeignKeyDDL(ForeignKey $fk)
Builds the DDL SQL to drop a foreign key.
at line 578
public string
getForeignKeyDDL(ForeignKey $fk)
Builds the DDL SQL for a ForeignKey object.
at line 604
public
getCommentLineDDL($comment)
at line 611
public
getCommentBlockDDL($comment)
at line 627
public string
getModifyDatabaseDDL(PropelDatabaseDiff $databaseDiff)
Builds the DDL SQL to modify a database based on a PropelDatabaseDiff instance
at line 658
public string
getRenameTableDDL($fromTableName, $toTableName)
Builds the DDL SQL to rename a table
at line 675
public string
getModifyTableDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table based on a PropelTableDiff instance
at line 740
public string
getModifyTableColumnsDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table based on a PropelTableDiff instance
at line 769
public string
getModifyTablePrimaryKeyDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table's primary key based on a PropelTableDiff instance
at line 787
public string
getModifyTableIndicesDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table's indices based on a PropelTableDiff instance
at line 814
public string
getModifyTableForeignKeysDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table's foreign keys based on a PropelTableDiff instance
at line 840
public string
getRemoveColumnDDL(Column $column)
Builds the DDL SQL to remove a column
at line 855
public string
getRenameColumnDDL($fromColumn, $toColumn)
Builds the DDL SQL to rename a column
at line 872
public string
getModifyColumnDDL(PropelColumnDiff $columnDiff)
Builds the DDL SQL to modify a column
at line 889
public string
getModifyColumnsDDL($columnDiffs)
Builds the DDL SQL to modify a list of columns
at line 921
public string
getAddColumnDDL(Column $column)
Builds the DDL SQL to remove a column
at line 937
public string
getAddColumnsDDL($columns)
Builds the DDL SQL to remove a list of columns
at line 969
public boolean
hasSize(string $sqlType)
Returns if the RDBMS-specific SQL type has a size attribute.
at line 980
public boolean
hasScale(string $sqlType)
Returns if the RDBMS-specific SQL type has a scale attribute.
at line 990
public string
quote(string $text)
Quote and escape needed characters in the string for unerlying RDBMS.
at line 1018
public string
quoteIdentifier(string $text)
Quotes identifiers used in database SQL.
at line 1023
public
setIdentifierQuoting($enabled = true)
at line 1028
public
getIdentifierQuoting()
at line 1037
public boolean
supportsNativeDeleteTrigger()
Whether RDBMS supports native ON DELETE triggers (e.g.
ON DELETE CASCADE).
at line 1046
public boolean
supportsInsertNullPk()
Whether RDBMS supports INSERT null values in autoincremented primary keys
at line 1055
public boolean
hasStreamBlobImpl()
Whether the underlying PDO driver for this platform returns BLOB columns as streams (instead of strings).
at line 1063
public
supportsSchemas()
at line 1080
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.
at line 1090
public string
getTimestampFormatter()
Gets the preferred timestamp formatter for setting date/time values.
at line 1099
public string
getTimeFormatter()
Gets the preferred time formatter for setting date/time values.
at line 1108
public string
getDateFormatter()
Gets the preferred date formatter for setting date/time values.