Doctrine_Export > Doctrine_Connection_Module
| Returns | Name | Description |
|---|---|---|
| alterTable | alter an existing table (this method is implemented by the drivers) | |
| string | alterTableSql | generates the sql for altering an existing table (this method is implemented by the drivers) |
| createConstraint | create a constraint on a table | |
| createConstraintSql | create a constraint on a table | |
| createDatabase | create a new database (this method is implemented by the drivers) | |
| string | createDatabaseSql | create a new database (this method is implemented by the drivers) |
| string | createForeignKey | |
| string | createForeignKeySql | |
| createIndex | Get the stucture of a field into an array | |
| string | createIndexSql | Get the stucture of a field into an array |
| createSequence | create sequence | |
| string | createSequenceSql | return RDBMS specific create sequence statement (this method is implemented by the drivers) |
| createTable | create a new table | |
| string | createTableSql | create a new table |
| dropConstraint | drop existing constraint | |
| dropDatabase | drop an existing database (this method is implemented by the drivers) | |
| dropDatabaseSql | drop an existing database (this method is implemented by the drivers) | |
| dropForeignKey | drop existing foreign key | |
| dropIndex | drop existing index | |
| string | dropIndexSql | |
| dropSequence | dropSequenceSql drop existing sequence (this method is implemented by the drivers) | |
| dropSequenceSql | dropSequenceSql drop existing sequence | |
| dropTable | dropTable drop an existing table | |
| string | dropTableSql | dropTableSql drop an existing table |
| exportClasses | exportClasses method for exporting Doctrine_Record classes to a schema FIXME: This function has ugly hacks in it to make sure sql is inserted in the correct order. | |
| exportClassesSql | exportClassesSql method for exporting Doctrine_Record classes to a schema | |
| array | exportGeneratorsSql | exportGeneratorsSql exports plugin tables for given table |
| exportSchema | exportSchema method for exporting Doctrine_Record classes to a schema if the directory parameter is given this method first iterates recursively trhough the given directory in order to find any model classes Then it iterates through all declared classes and creates tables for the ones that extend Doctrine_Record and are n | |
| exportSql | exportSql returns the sql for exporting Doctrine_Record classes to a schema if the directory parameter is given this method first iterates recursively trhough the given directory in order to find any model classes Then it iterates through all declared classes and creates tables for the ones that extend Doctrine_Record and are n | |
| boolean | exportTable | exportTable exports given table into database based on column and option definitions |
| string | getAdvancedForeignKeyOptions | getAdvancedForeignKeyOptions Return the FOREIGN KEY query section dealing with non-standard options as MATCH, INITIALLY DEFERRED, ON UPDATE, ... |
| array | getAllGenerators | fetches all generators recursively for given table |
| string | getCharsetFieldDeclaration | Obtain DBMS specific SQL code portion needed to set the CHARACTER SET of a field declaration to be used in statements like CREATE TABLE. |
| string | getCheckDeclaration | Obtain DBMS specific SQL code portion needed to set a CHECK constraint declaration to be used in statements like CREATE TABLE. |
| string | getCollationFieldDeclaration | Obtain DBMS specific SQL code portion needed to set the COLLATION of a field declaration to be used in statements like CREATE TABLE. |
| string | getDeclaration | Obtain DBMS specific SQL code portion needed to declare a generic type field to be used in statements like CREATE TABLE. |
| string | getDefaultFieldDeclaration | getDefaultDeclaration Obtain DBMS specific SQL code portion needed to set a default value declaration to be used in statements like CREATE TABLE. |
| string | getFieldDeclarationList | Get declaration of a number of field in bulk |
| string | getForeignKeyBaseDeclaration | getForeignKeyBaseDeclaration Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint of a field declaration to be used in statements like CREATE TABLE. |
| string | getForeignKeyDeclaration | getForeignKeyDeclaration Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint of a field declaration to be used in statements like CREATE TABLE. |
| getForeignKeyReferentialAction | returns given referential action in uppercase if valid, otherwise throws an exception | |
| string | getIndexDeclaration | Obtain DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE. |
| string | getIndexFieldDeclarationList | getIndexFieldDeclarationList Obtain DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE. |
| string | getTemporaryTableQuery | A method to return the required SQL string that fits between CREATE ... TABLE to create the table as a temporary table. Should be overridden in driver classes to return the correct string for the specific database type. The default is to return the string "TEMPORARY" - this will result in a SQL error for any database that does not support temporary tables, or t |
| string | getUniqueFieldDeclaration | Obtain DBMS specific SQL code portion needed to set the UNIQUE constraint of a field declaration to be used in statements like CREATE TABLE. |
| $name | name of the table that is intended to be changed. |
| $changes | associative array that contains the details of each type of change that is intended to be performed. The types of changes that are currently supported are defined as follows: name New name f |
| $check | indicates whether the function should just check if the DBMS driver can perform the requested table alterations if the value is true or actually perform them otherwise. |
alter an existing table (this method is implemented by the drivers)
| $name | name of the table that is intended to be changed. |
| $changes | associative array that contains the details of each type * |
| $check | indicates whether the function should just check if the DBMS driver can perform the requested table alterations if the value is true or actually perform them otherwise. |
generates the sql for altering an existing table (this method is implemented by the drivers)
| $table | name of the table on which the constraint is to be created |
| $name | name of the constraint to be created |
| $definition | associative array that defines properties of the constraint to be created. Currently, only one property named FIELDS is supported. This property is also an associative with the names of |
create a constraint on a table
| $table | name of the table on which the constraint is to be created |
| $name | name of the constraint to be created |
| $definition | associative array that defines properties of the constraint to be created. Currently, only one property named FIELDS is supported. This property is also an associative with the names of |
create a constraint on a table
| $name | name of the database that should be created |
create a new database (this method is implemented by the drivers)
| $name | name of the database that should be created |
create a new database (this method is implemented by the drivers)
| $table | name of the table on which the foreign key is to be created |
| $definition | associative array that defines properties of the foreign key to be created. |
| $table | name of the table on which the foreign key is to be created |
| $definition | associative array that defines properties of the foreign key to be created. |
| $table | name of the table on which the index is to be created |
| $name | name of the index to be created |
| $definition | associative array that defines properties of the index to be created. Currently, only one property named FIELDS is supported. This property is also an associative with the names of the i |
Get the stucture of a field into an array
| $table | name of the table on which the index is to be created |
| $name | name of the index to be created |
| $definition | associative array that defines properties of the index to be created. |
Get the stucture of a field into an array
| $seqName | name of the sequence to be created |
| $start | start value of the sequence; default is 1 |
| $options | An associative array of table options: array( 'comment' => 'Foo', 'charset' => 'utf8', 'collate' => 'utf8_unicode_ci', ); |
create sequence
throws Doctrine_Connection_Exception if something fails at database level
| $seqName | name of the sequence to be created |
| $start | start value of the sequence; default is 1 |
| $options | An associative array of table options: array( 'comment' => 'Foo', 'charset' => 'utf8', 'collate' => 'utf8_unicode_ci', ); |
return RDBMS specific create sequence statement (this method is implemented by the drivers)
throws Doctrine_Connection_Exception if something fails at database level
| $name | Name of the database that should be created |
| $fields | Associative array that contains the definition of each field of the new table |
| $options | An associative array of table options: |
create a new table
| $name | Name of the database that should be created |
| $fields | Associative array that contains the definition of each field of the new table The indexes of the array entries are the names of the fields of the table an the array entry values are associ |
| $options | An associative array of table options: |
create a new table
| $table | name of table that should be used in method |
| $name | name of the constraint to be dropped |
| $primary | hint if the constraint is primary |
drop existing constraint
| $name | name of the database that should be dropped |
drop an existing database (this method is implemented by the drivers)
| $name | name of the database that should be dropped |
drop an existing database (this method is implemented by the drivers)
| $table | name of table that should be used in method |
| $name | name of the foreign key to be dropped |
drop existing foreign key
| $table | name of table that should be used in method |
| $name | name of the index to be dropped |
drop existing index
| $table | name of table that should be used in method |
| $name | name of the index to be dropped |
returns SQL that is used for dropping an index
| $sequenceName | name of the sequence to be dropped |
dropSequenceSql drop existing sequence (this method is implemented by the drivers)
throws Doctrine_Connection_Exception if something fails at database level
| $sequenceName | name of the sequence to be dropped |
dropSequenceSql drop existing sequence
throws Doctrine_Connection_Exception if something fails at database level
| $table | name of table that should be dropped from the database |
dropTable drop an existing table
| $table | name of table that should be dropped from the database |
dropTableSql drop an existing table
exportClasses method for exporting Doctrine_Record classes to a schema
FIXME: This function has ugly hacks in it to make sure sql is inserted in the correct order.
throws Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation
exportClassesSql method for exporting Doctrine_Record classes to a schema
throws Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation
| $table | the table in which the generators belong to |
exportGeneratorsSql exports plugin tables for given table
returns an array of sql strings
| $directory | optional directory parameter |
exportSchema method for exporting Doctrine_Record classes to a schema
if the directory parameter is given this method first iterates recursively trhough the given directory in order to find any model classes
Then it iterates through all declared classes and creates tables for the ones that extend Doctrine_Record and are n
throws Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation
| $directory | optional directory parameter |
exportSql returns the sql for exporting Doctrine_Record classes to a schema
if the directory parameter is given this method first iterates recursively trhough the given directory in order to find any model classes
Then it iterates through all declared classes and creates tables for the ones that extend Doctrine_Record and are n
throws Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation
exportTable exports given table into database based on column and option definitions
returns whether or not the export operation was successful false if table already existed in the database
throws Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation
| $definition | foreign key definition |
getAdvancedForeignKeyOptions Return the FOREIGN KEY query section dealing with non-standard options as MATCH, INITIALLY DEFERRED, ON UPDATE, ...
| $table | table object to retrieve the generators from |
fetches all generators recursively for given table
returns an array of Doctrine_Record_Generator objects
| $charset | name of the charset |
Obtain DBMS specific SQL code portion needed to set the CHARACTER SET of a field declaration to be used in statements like CREATE TABLE.
returns DBMS specific SQL code portion needed to set the CHARACTER SET of a field declaration.
| $definition | check definition |
Obtain DBMS specific SQL code portion needed to set a CHECK constraint declaration to be used in statements like CREATE TABLE.
returns DBMS specific SQL code portion needed to set a CHECK constraint
| $collation | name of the collation |
Obtain DBMS specific SQL code portion needed to set the COLLATION of a field declaration to be used in statements like CREATE TABLE.
returns DBMS specific SQL code portion needed to set the COLLATION of a field declaration.
| $name | name the field to be declared. |
| $field | associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows: length Integer val |
Obtain DBMS specific SQL code portion needed to declare a generic type field to be used in statements like CREATE TABLE.
returns DBMS specific SQL code portion that should be used to declare the specified field.
| $field | field definition array |
getDefaultDeclaration Obtain DBMS specific SQL code portion needed to set a default value declaration to be used in statements like CREATE TABLE.
returns DBMS specific SQL code portion needed to set a default value
| $fields | a multidimensional associative array. The first dimension determines the field name, while the second dimension is keyed with the name of the properties of the field being declared as array indexes. Cu |
Get declaration of a number of field in bulk
getForeignKeyBaseDeclaration Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint of a field declaration to be used in statements like CREATE TABLE.
| $definition | an associative array with the following structure: name optional constraint name local the local field(s) foreign the foreign reference field(s) for |
getForeignKeyDeclaration Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint of a field declaration to be used in statements like CREATE TABLE.
returns DBMS specific SQL code portion needed to set the FOREIGN KEY constraint of a field declaration.
| $action | foreign key referential action |
| 1 | foreign key referential action in uppercase |
returns given referential action in uppercase if valid, otherwise throws an exception
throws Doctrine_Exception_Exception if unknown referential action given
| $name | name of the index |
| $definition | index definition |
Obtain DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE.
returns DBMS specific SQL code portion needed to set an index
getIndexFieldDeclarationList Obtain DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE.
A method to return the required SQL string that fits between CREATE ... TABLE to create the table as a temporary table.
Should be overridden in driver classes to return the correct string for the specific database type.
The default is to return the string "TEMPORARY" - this will result in a SQL error for any database that does not support temporary tables, or t
returns The string required to be placed between "CREATE" and "TABLE" to generate a temporary table, if possible.
Obtain DBMS specific SQL code portion needed to set the UNIQUE constraint of a field declaration to be used in statements like CREATE TABLE.
returns DBMS specific SQL code portion needed to set the UNIQUE constraint of a field declaration.