
Adds cross-database CREATE TABLE, ALTER TABLE and COMMENT ON COLUMN statements to fSQLTranslation
1.0.0b3 | Fixed associating a sequence with a column in PostgreSQL when setting auto-increment, fixed detection of some Oracle CHECK(IN) constraints, fixed default values for SQLite ON DELETE and ON UPDATE clauses 1/12/12 |
---|---|
1.0.0b2 | Fixed detection of explicitly named SQLite foreign key constraints 8/23/11 |
1.0.0b | The initial implementation 5/9/11 |
Composes text using fText if loaded
string compose( string $message, mixed $component [, ... ] )
string | $message | The message to compose |
mixed | $component [, ... ] | A string or number to insert into the message |
The composed and possible translated message
Sets up the class
fSQLSchemaTranslation __construct( fDatabase $database )
fDatabase | $database | The database being translated for |
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
All requests that hit this method should be requests for callbacks
callback __get( string $method )
string | $method | The method to create a callback for |
The callback for the method requested
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
Translates a Flourish SQL DDL statement into the dialect for the current database
array translate( string $sql, array &$rollback_statements=NULL )
string | $sql | The SQL statement to translate |
array | &$rollback_statements | SQL statements to rollback the returned SQL statements if something goes wrong - only applicable for MySQL ALTER TABLE statements |
An array containing the translated $sql statement and an array of extra statements