Pt_BR En Ja De Fr 
You are currently viewing the Development branch api documentation. Switch to 0.11 or 1.0

Development Doctrine_Export

Doctrine Export

Inheritence

Doctrine_Export  < Doctrine_Connection_Module

Direct Sub-Classes

Method Details

  • $directory optional directory parameter

    exportSchema($directory = null)

    exportSchema method for exporting Doctrine_Entity 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_Entity and are n

    throws Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation


  • $name name of the database that should be dropped

    dropDatabaseSql($database, $name)

    drop an existing database (this method is implemented by the drivers)


  • $table the table in which the generators belong to

    (array) exportGeneratorsSql(( ) $class, (Doctrine_Table) $table)

    exportGeneratorsSql exports plugin tables for given table

    Doctrine_Export


  • $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

    createConstraintSql($table, $name, $definition)

    create a constraint on a table


  • $sequenceName name of the sequence to be dropped

    dropSequence($sequenceName)

    dropSequenceSql drop existing sequence (this method is implemented by the drivers)

    throws Doctrine_Connection_Exception if something fails at database level


  • $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.

    (string) createIndexSql($table, $name, $definition)

    Get the stucture of a field into an array


  • $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

    (string) getDeclaration($name, $field)

    Obtain DBMS specific SQL code portion needed to declare a generic type field to be used in statements like CREATE TABLE.

    Doctrine_Export


  • $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:

    (string) createTableSql($name, $fields, $options = array())

    create a new table


  • $field field definition array

    (string) getDefaultFieldDeclaration($field)

    getDefaultDeclaration Obtain DBMS specific SQL code portion needed to set a default value declaration to be used in statements like CREATE TABLE.

    Doctrine_Export


  • $definition foreign key definition

    (string) getAdvancedForeignKeyOptions($definition)

    getAdvancedForeignKeyOptions Return the FOREIGN KEY query section dealing with non-standard options as MATCH, INITIALLY DEFERRED, ON UPDATE, ...


  • $name name of the database that should be dropped

    dropDatabase($database, $name)

    drop an existing database (this method is implemented by the drivers)


  • exportClassesSql($classes)

    exportClassesSql method for exporting Doctrine_Entity classes to a schema

    throws Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation


  • $charset name of the charset

    (string) getCharsetFieldDeclaration($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.

    Doctrine_Export


  • $collation name of the collation

    (string) getCollationFieldDeclaration($collation)

    Obtain DBMS specific SQL code portion needed to set the COLLATION of a field declaration to be used in statements like CREATE TABLE.

    Doctrine_Export


  • $table name of table that should be used in method
    $name name of the index to be dropped

    dropIndex($table, $name)

    drop existing index


  • $sequenceName name of the sequence to be dropped

    dropSequenceSql($sequenceName)

    dropSequenceSql drop existing sequence

    throws Doctrine_Connection_Exception if something fails at database level


  • $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

    createConstraint($table, $name, $definition)

    create a constraint on a table


  • $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.

    (string) alterTableSql($name, $changes, $check = false)

    generates the sql for altering an existing table (this method is implemented by the drivers)


  • (boolean) exportTable(( ) $metadata)

    exportTable exports given table into database based on column and option definitions

    Doctrine_Export

    throws Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation


  • (string) getForeignKeyBaseDeclaration($definition)

    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.


  • $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.

    (string) createForeignKeySql($table, $definition)


  • $definition check definition

    (string) getCheckDeclaration($definition)

    Obtain DBMS specific SQL code portion needed to set a CHECK constraint declaration to be used in statements like CREATE TABLE.

    Doctrine_Export


  • exportClasses($classes)

    FIXME: This method is a big huge hack. The sql needs to be executed in the correct order. I have some stupid logic to make sure they are in the right order.
    method for exporting Doctrine_Entity classes to a schema

    throws Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation


  • $table name of table that should be dropped from the database

    dropTable($table)

    dropTable drop an existing table


  • $directory optional directory parameter

    exportSql($directory = null)

    exportSql returns the sql for exporting Doctrine_Entity 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_Entity and are n

    throws Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation


  • $action foreign key referential action
    1 foreign key referential action in uppercase

    getForeignKeyReferentialAction($action, 1)

    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 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.

    alterTable($name, $changes, $check = false)

    alter an existing table (this method is implemented by the drivers)


  • $table name of table that should be used in method
    $name name of the index to be dropped

    (string) dropIndexSql($table, $name)

    Doctrine_Export


  • $table name of table that should be dropped from the database

    (string) dropTableSql($table)

    dropTableSql drop an existing 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

    dropConstraint($table, $name, $primary = false)

    drop existing constraint


  • $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', );

    createSequence($seqName, $start = 1, $options = array())

    create sequence

    throws Doctrine_Connection_Exception if something fails at database level


  • $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

    createIndex($table, $name, $definition)

    Get the stucture of a field into an array


  • (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.

    Doctrine_Export


  • $definition

    an associative array with the following structure: name optional constraint name

    local the local field(s)

    foreign the foreign reference field(s)

    for

    (string) getForeignKeyDeclaration($definition)

    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.

    Doctrine_Export


  • (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

    Doctrine_Export


  • $table name of table that should be used in method
    $name name of the foreign key to be dropped

    dropForeignKey($table, $name)

    drop existing foreign key


  • $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', );

    (string) createSequenceSql($seqName, $start = 1, $options = array())

    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 index
    $definition index definition

    (string) getIndexDeclaration($name, $definition)

    Obtain DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE.

    Doctrine_Export


  • $table table object to retrieve the generators from

    (array) getAllGenerators(( ) $table)

    fetches all generators recursively for given table

    Doctrine_Export


  • $name name of the database that should be created

    createDatabase($database, $name)

    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.

    (string) createForeignKey($table, $definition)


  • $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

    (string) getFieldDeclarationList($fields)

    Get declaration of a number of field in bulk


  • $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:

    createTable($name, $fields, $options = array())

    create a new table


  • $name name of the database that should be created

    (string) createDatabaseSql($database, $name)

    create a new database (this method is implemented by the drivers)


  • (string) getIndexFieldDeclarationList($fields)

    getIndexFieldDeclarationList Obtain DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE.


Comments (0) [ add comment ]

 No Comments

Add Comment

Add New Comment
Please enter follow the doctrine