class SqlitePlatform extends DefaultPlatform
SQLite PropelPlatformInterface implementation.
Methods
__construct(PDO $con = null)
Default constructor. |
from DefaultPlatform | |
setConnection(PDO $con = null)
Set the database connection to use for this Platform class. |
from DefaultPlatform | |
PDO |
getConnection()
Returns the database connection to use for this Platform class. |
from DefaultPlatform |
setGeneratorConfig(GeneratorConfig $config)
Sets the GeneratorConfig to use in the parsing. |
from DefaultPlatform | |
string |
getDatabaseType()
Returns the short name of the database type that this platform represents. |
from DefaultPlatform |
getMaxColumnNameLength() | ||
string |
getNativeIdMethod()
Returns the native IdMethod (sequence|identity) |
from DefaultPlatform |
isNativeIdMethodAutoIncrement() | from DefaultPlatform | |
Domain |
getDomainForType(string $propelType)
Returns the db specific domain for a propelType. |
from DefaultPlatform |
string | getNullString($notNull) | from DefaultPlatform |
getAutoIncrement() | ||
string |
getSequenceName(Table $table)
Gets the name to use for creating a sequence for a table. |
from DefaultPlatform |
string |
getAddTablesDDL(Database $database)
Builds the DDL SQL to add the tables of a database together with index and foreign keys |
from DefaultPlatform |
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 |
from DefaultPlatform |
getAddTableDDL(Table $table) | ||
string |
getColumnDDL(Column $col)
Builds the DDL SQL for a Column object. |
from DefaultPlatform |
string |
getColumnDefaultValueDDL(Column $col)
Returns the SQL for the default value of a Column object |
from DefaultPlatform |
string |
getColumnListDDL($columns, $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 |
from DefaultPlatform |
string |
getPrimaryKeyDDL(Table $table)
Returns the SQL for the primary key of a Table object |
from DefaultPlatform |
getDropPrimaryKeyDDL(Table $table) | ||
getAddPrimaryKeyDDL(Table $table) | ||
string |
getAddIndicesDDL(Table $table)
Builds the DDL SQL to add the indices of a table. |
from DefaultPlatform |
string |
getAddIndexDDL(Index $index)
Builds the DDL SQL to add an Index. |
from DefaultPlatform |
string |
getDropIndexDDL(Index $index)
Builds the DDL SQL to drop an Index. |
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. |
from DefaultPlatform |
string |
getAddForeignKeysDDL(Table $table)
Builds the DDL SQL to add the foreign keys of a table. |
from DefaultPlatform |
getAddForeignKeyDDL(ForeignKey $fk) | ||
getDropForeignKeyDDL(ForeignKey $fk) | ||
getForeignKeyDDL(ForeignKey $fk) | ||
getCommentLineDDL($comment) | from DefaultPlatform | |
getCommentBlockDDL($comment) | from DefaultPlatform | |
string |
getModifyDatabaseDDL(PropelDatabaseDiff $databaseDiff)
Builds the DDL SQL to modify a database based on a PropelDatabaseDiff instance |
from DefaultPlatform |
string |
getRenameTableDDL($fromTableName, $toTableName)
Builds the DDL SQL to rename a table |
from DefaultPlatform |
string |
getModifyTableDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table based on a PropelTableDiff instance |
from DefaultPlatform |
string |
getModifyTableColumnsDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table based on a PropelTableDiff instance |
from DefaultPlatform |
string |
getModifyTablePrimaryKeyDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table's primary key based on a PropelTableDiff instance |
from DefaultPlatform |
string |
getModifyTableIndicesDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table's indices based on a PropelTableDiff instance |
from DefaultPlatform |
string |
getModifyTableForeignKeysDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table's foreign keys based on a PropelTableDiff 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(PropelColumnDiff $columnDiff)
Builds the DDL SQL to modify a column |
from DefaultPlatform |
string |
getModifyColumnsDDL($columnDiffs)
Builds the DDL SQL to modify a list of columns |
from DefaultPlatform |
string |
getAddColumnDDL(Column $column)
Builds the DDL SQL to remove a column |
from DefaultPlatform |
string |
getAddColumnsDDL($columns)
Builds the DDL SQL to remove a list of columns |
from DefaultPlatform |
hasSize($sqlType) | ||
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 unerlying RDBMS. |
from DefaultPlatform |
quoteIdentifier($text) | ||
setIdentifierQuoting($enabled = true) | from DefaultPlatform | |
getIdentifierQuoting() | from DefaultPlatform | |
boolean |
supportsNativeDeleteTrigger()
Whether RDBMS supports native ON DELETE triggers (e.g. |
from DefaultPlatform |
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). |
from DefaultPlatform |
supportsSchemas() | from DefaultPlatform | |
supportsMigrations() | ||
supportsVarcharWithoutSize() | from DefaultPlatform | |
mixed |
getBooleanString($b)
Returns the boolean value for the RDBMS. |
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. |
from DefaultPlatform | |
string |
disconnectedEscapeText(string $text)
Escape the string for RDBMS. |
Details
in DefaultPlatform at line 48
public
__construct(PDO $con = null)
Default constructor.
in DefaultPlatform at line 58
public
setConnection(PDO $con = null)
Set the database connection to use for this Platform class.
in DefaultPlatform at line 67
public PDO
getConnection()
Returns the database connection to use for this Platform class.
in DefaultPlatform at line 77
public
setGeneratorConfig(GeneratorConfig $config)
Sets the GeneratorConfig to use in the parsing.
in DefaultPlatform 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 50
public
getMaxColumnNameLength()
in DefaultPlatform at line 149
public string
getNativeIdMethod()
Returns the native IdMethod (sequence|identity)
in DefaultPlatform at line 154
public
isNativeIdMethodAutoIncrement()
in DefaultPlatform at line 165
public Domain
getDomainForType(string $propelType)
Returns the db specific domain for a propelType.
in DefaultPlatform at line 177
public string
getNullString($notNull)
at line 45
public
getAutoIncrement()
in DefaultPlatform at line 200
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.
in DefaultPlatform at line 230
public string
getAddTablesDDL(Database $database)
Builds the DDL SQL to add the tables of a database together with index and foreign keys
in DefaultPlatform at line 249
public string
getBeginDDL()
Gets the requests to execute at the beginning of a DDL file
in DefaultPlatform at line 258
public string
getEndDDL()
Gets the requests to execute at the end of a DDL file
in DefaultPlatform at line 266
public string
getDropTableDDL(Table $table)
Builds the DDL SQL to drop a table
at line 55
public
getAddTableDDL(Table $table)
in DefaultPlatform at line 317
public string
getColumnDDL(Column $col)
Builds the DDL SQL for a Column object.
in DefaultPlatform at line 345
public string
getColumnDefaultValueDDL(Column $col)
Returns the SQL for the default value of a Column object
in DefaultPlatform at line 381
public string
getColumnListDDL($columns, $delimiter = ',')
Creates a delimiter-delimited string list of column names, quoted using quoteIdentifier().
in DefaultPlatform at line 397
public string
getPrimaryKeyName(Table $table)
Returns the name of a table primary key
in DefaultPlatform at line 407
public string
getPrimaryKeyDDL(Table $table)
Returns the SQL for the primary key of a Table object
at line 92
public
getDropPrimaryKeyDDL(Table $table)
at line 98
public
getAddPrimaryKeyDDL(Table $table)
in DefaultPlatform at line 454
public string
getAddIndicesDDL(Table $table)
Builds the DDL SQL to add the indices of a table.
in DefaultPlatform at line 469
public string
getAddIndexDDL(Index $index)
Builds the DDL SQL to add an Index.
in DefaultPlatform at line 488
public string
getDropIndexDDL(Index $index)
Builds the DDL SQL to drop an Index.
in DefaultPlatform at line 504
public string
getIndexDDL(Index $index)
Builds the DDL SQL for an Index object.
in DefaultPlatform at line 519
public string
getUniqueDDL(Unique $unique)
Builds the DDL SQL for a Unique constraint object.
in DefaultPlatform at line 530
public string
getAddForeignKeysDDL(Table $table)
Builds the DDL SQL to add the foreign keys of a table.
at line 104
public
getAddForeignKeyDDL(ForeignKey $fk)
at line 110
public
getDropForeignKeyDDL(ForeignKey $fk)
at line 115
public
getForeignKeyDDL(ForeignKey $fk)
in DefaultPlatform at line 609
public
getCommentLineDDL($comment)
in DefaultPlatform at line 616
public
getCommentBlockDDL($comment)
in DefaultPlatform at line 632
public string
getModifyDatabaseDDL(PropelDatabaseDiff $databaseDiff)
Builds the DDL SQL to modify a database based on a PropelDatabaseDiff instance
in DefaultPlatform at line 666
public string
getRenameTableDDL($fromTableName, $toTableName)
Builds the DDL SQL to rename a table
in DefaultPlatform at line 683
public string
getModifyTableDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table based on a PropelTableDiff instance
in DefaultPlatform at line 748
public string
getModifyTableColumnsDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table based on a PropelTableDiff instance
in DefaultPlatform at line 777
public string
getModifyTablePrimaryKeyDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table's primary key based on a PropelTableDiff instance
in DefaultPlatform at line 795
public string
getModifyTableIndicesDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table's indices based on a PropelTableDiff instance
in DefaultPlatform at line 822
public string
getModifyTableForeignKeysDDL(PropelTableDiff $tableDiff)
Builds the DDL SQL to alter a table's foreign keys based on a PropelTableDiff instance
in DefaultPlatform at line 848
public string
getRemoveColumnDDL(Column $column)
Builds the DDL SQL to remove a column
in DefaultPlatform at line 863
public string
getRenameColumnDDL($fromColumn, $toColumn)
Builds the DDL SQL to rename a column
in DefaultPlatform at line 880
public string
getModifyColumnDDL(PropelColumnDiff $columnDiff)
Builds the DDL SQL to modify a column
in DefaultPlatform at line 897
public string
getModifyColumnsDDL($columnDiffs)
Builds the DDL SQL to modify a list of columns
in DefaultPlatform at line 929
public string
getAddColumnDDL(Column $column)
Builds the DDL SQL to remove a column
in DefaultPlatform at line 945
public string
getAddColumnsDDL($columns)
Builds the DDL SQL to remove a list of columns
at line 128
public
hasSize($sqlType)
in DefaultPlatform at line 988
public boolean
hasScale(string $sqlType)
Returns if the RDBMS-specific SQL type has a scale attribute.
in DefaultPlatform at line 998
public string
quote(string $text)
Quote and escape needed characters in the string for unerlying RDBMS.
at line 148
public
quoteIdentifier($text)
in DefaultPlatform at line 1031
public
setIdentifierQuoting($enabled = true)
in DefaultPlatform at line 1036
public
getIdentifierQuoting()
in DefaultPlatform at line 1045
public boolean
supportsNativeDeleteTrigger()
Whether RDBMS supports native ON DELETE triggers (e.g.
ON DELETE CASCADE).
in DefaultPlatform at line 1054
public boolean
supportsInsertNullPk()
Whether RDBMS supports INSERT null values in autoincremented primary keys
in DefaultPlatform at line 1063
public boolean
hasStreamBlobImpl()
Whether the underlying PDO driver for this platform returns BLOB columns as streams (instead of strings).
in DefaultPlatform at line 1071
public
supportsSchemas()
at line 156
public
supportsMigrations()
in DefaultPlatform at line 1085
public
supportsVarcharWithoutSize()
in DefaultPlatform at line 1101
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 1111
public string
getTimestampFormatter()
Gets the preferred timestamp formatter for setting date/time values.
in DefaultPlatform at line 1120
public string
getTimeFormatter()
Gets the preferred time formatter for setting date/time values.
in DefaultPlatform at line 1129
public string
getDateFormatter()
Gets the preferred date formatter for setting date/time values.
in DefaultPlatform at line 1139
public
getColumnBindingPHP($column, $identifier, $columnValueAccessor, $tab = ' ')
Get the PHP snippet for binding a value to a column.
Warning: duplicates logic from DBAdapter::bindValue().
Any code modification here must be ported there.
in DefaultPlatform at line 1175
public
getIdentifierPhp($columnValueMutator, $connectionVariableName = '$con', $sequenceName = '', $tab = ' ')
Get the PHP snippet for getting a Pk from the database.
Warning: duplicates logic from DBAdapter::getId().
Any code modification here must be ported there.
Typical output:
<code>
$this->id = $con->lastInsertId();
</code>
at line 139
public string
disconnectedEscapeText(string $text)
Escape the string for RDBMS.