DatabaseSchema: ezcDbSchemaDbWriter
[ ]
[ ]
[ ]
[ ]
[ ]
Interface: ezcDbSchemaDbWriter
|
This class provides the interface for database schema writers [
source]
Parents
ezcDbSchemaWriter
|
--ezcDbSchemaDbWriter
Method Summary
|
public array(string) |
convertToDDL(
$dbSchema )
Returns an array with SQL DDL statements that creates the database definition in $dbSchema |
|
public boolean |
isQueryAllowed(
$db, $query, $query
)
Checks if the query is allowed. |
|
public void |
saveToDb(
$db, $dbSchema )
Creates the tables contained in $schema in the database that is related to $db |
Inherited Methods
From
ezcDbSchemaWriter :
Methods
convertToDDL
Returns an array with SQL DDL statements that creates the database definition in $dbSchema
Converts the schema definition contained in $dbSchema to DDL SQL. This SQL can be used to create tables in an existing database according to the definition. The SQL queries are returned as an array.
Parameters
isQueryAllowed
boolean isQueryAllowed(
$db,
$query, string
$query
)
Checks if the query is allowed.
Perform testing if table exist for DROP TABLE query to avoid stoping execution while try to drop not existent table.
Parameters
saveToDb
Creates the tables contained in $schema in the database that is related to $db
This method takes the table definitions from $schema and will create the tables according to this definition in the database that is references by the $db handler. If tables with the same name as contained in the definitions already exist they will be removed and recreated with the new definition.
Parameters
Last updated: Thu, 08 Jan 2009