Class: Doctrine_Export

Source Location: /Doctrine/Export.php

Class Doctrine_Export

Class Overview
Direct descendents
Child Class Description
Doctrine_Export_Firebird Doctrine_Export_Sqlite
Doctrine_Export_Frontbase Doctrine_Export_Frontbase
Doctrine_Export_Mssql Doctrine_Export_Mssql
Doctrine_Export_Mysql Doctrine_Export_Mysql
Doctrine_Export_Oracle Doctrine_Export_Oracle
Doctrine_Export_Pgsql Doctrine_Export_Pgsql
Doctrine_Export_Sqlite Doctrine_Export_Sqlite

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Doctrine_Connection_Module

Doctrine_Connection_Module::$conn
Doctrine_Connection_Module::$moduleName

Inherited From Doctrine_Connection_Module

Doctrine_Connection_Module::__construct()
Doctrine_Connection_Module::getConnection()
getConnection returns the connection object this module uses
Doctrine_Connection_Module::getModuleName()
getModuleName returns the name of this module

[ Top ]
Property Summary
mixed   $valid_default_values  

[ Top ]
Method Summary
void   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)
void   createConstraint()   create a constraint on a table
void   createConstraintSql()   create a constraint on a table
void   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   createForeignKeySql()   createForeignKeySql
void   createIndex()   Get the stucture of a field into an array
string   createIndexSql()   Get the stucture of a field into an array
void   createSequence()   create sequence
string   createSequenceSql()   return RDBMS specific create sequence statement (this method is implemented by the drivers)
void   createTable()   create a new table
string   createTableSql()   create a new table
void   dropConstraint()   drop existing constraint
void   dropDatabase()   drop an existing database (this method is implemented by the drivers)
void   dropDatabaseSql()   drop an existing database (this method is implemented by the drivers)
void   dropIndex()   drop existing index
string   dropIndexSql()   dropIndexSql
void   dropSequence()   dropSequenceSql drop existing sequence (this method is implemented by the drivers)
void   dropSequenceSql()   dropSequenceSql drop existing sequence
void   dropTable()   dropTable drop an existing table
string   dropTableSql()   dropTableSql drop an existing table
void   exportClasses()   exportClasses method for exporting Doctrine_Record classes to a schema
void   exportClassesSql()   exportClassesSql method for exporting Doctrine_Record classes to a schema
void   exportSchema()   exportSchema method for exporting Doctrine_Record classes to a schema
void   exportSql()   exportSql returns the sql for exporting Doctrine_Record classes to a schema
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, ...
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.
void   getForeignKeyReferentialAction()   getForeignKeyReferentialAction
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.
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.

[ Top ]
Properties
mixed   $valid_default_values = array(
'text' => '',
'boolean' => true,
'integer' => 0,
'decimal' => 0.0,
'float' => 0.0,
'timestamp' => '1970-01-01 00:00:00',
'time' => '00:00:00',
'date' => '1970-01-01',
'clob' => '',
'blob' => '',
'string' => ''
)
[line 36]
API Tags:
Access:  protected


[ Top ]
Methods
alterTable  [line 550]

  void alterTable( string $name, $changes, boolean $check  )

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

Parameters:
string   $name:  name of the table that is intended to be changed.
array   $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 for the table.

add

Associative array with the names of fields to be added as indexes of the array. The value of each entry of the array should be set to another associative array with the properties of the fields to be added. The properties of the fields should be the same as defined by the MDB2 parser.

remove

Associative array with the names of fields to be removed as indexes of the array. Currently the values assigned to each entry are ignored. An empty array should be used for future compatibility.

rename

Associative array with the names of fields to be renamed as indexes of the array. The value of each entry of the array should be set to another associative array with the entry named name with the new field name and the entry named Declaration that is expected to contain the portion of the field declaration already in DBMS specific SQL code as it is used in the CREATE TABLE statement.

change

Associative array with the names of the fields to be changed as indexes of the array. Keep in mind that if it is intended to change either the name of a field and any other properties, the change array entries should have the new names of the fields as array indexes.

The value of each entry of the array should be set to another associative array with the properties of the fields to that are meant to be changed as array entries. These entries should be assigned to the new values of the respective properties. The properties of the fields should be the same as defined by the MDB2 parser.

Example array( 'name' => 'userlist', 'add' => array( 'quota' => array( 'type' => 'integer', 'unsigned' => 1 ) ), 'remove' => array( 'file_limit' => array(), 'time_limit' => array() ), 'change' => array( 'name' => array( 'length' => '20', 'definition' => array( 'type' => 'text', 'length' => 20, ), ) ), 'rename' => array( 'sex' => array( 'name' => 'gender', 'definition' => array( 'type' => 'text', 'length' => 1, 'default' => 'M', ), ) ) )

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

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
alterTableSql  [line 566]

  string alterTableSql( string $name, $changes, boolean $check  )

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

Parameters:
string   $name:  name of the table that is intended to be changed.
array   $changes:  associative array that contains the details of each type *
boolean   $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.

API Tags:
See:  Doctrine_Export::alterTable()
Access:  public


Redefined in descendants as:

[ Top ]
createConstraint  [line 331]

  void createConstraint( string $table, string $name, array $definition  )

create a constraint on a table

Parameters:
string   $table:  name of the table on which the constraint is to be created
string   $name:  name of the constraint to be created
array   $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 the constraint fields as array constraints. Each entry of this array is set to another type of associative array that specifies properties of the constraint that are specific to each field.

Example array( 'fields' => array( 'user_name' => array(), 'last_login' => array() ) )


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
createConstraintSql  [line 356]

  void createConstraintSql( string $table, string $name, array $definition  )

create a constraint on a table

Parameters:
string   $table:  name of the table on which the constraint is to be created
string   $name:  name of the constraint to be created
array   $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 the constraint fields as array constraints. Each entry of this array is set to another type of associative array that specifies properties of the constraint that are specific to each field.

Example array( 'fields' => array( 'user_name' => array(), 'last_login' => array() ) )


API Tags:
Access:  public


[ Top ]
createDatabase  [line 165]

  void createDatabase( $database, string $name  )

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

Parameters:
string   $name:  name of the database that should be created
   $database: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
createDatabaseSql  [line 176]

  string createDatabaseSql( $database, string $name  )

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

Parameters:
string   $name:  name of the database that should be created
   $database: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
createForeignKeySql  [line 453]

  string createForeignKeySql( string $table, $definition  )

createForeignKeySql

Parameters:
string   $table:  name of the table on which the foreign key is to be created
array   $definition:  associative array that defines properties of the foreign key to be created.

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
createIndex  [line 407]

  void createIndex( string $table, string $name, $definition  )

Get the stucture of a field into an array

Parameters:
string   $table:  name of the table on which the index is to be created
string   $name:  name of the index to be created
array   $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 index fields as array indexes. Each entry of this array is set to another type of associative array that specifies properties of the index that are specific to each field.

Currently, only the sorting property is supported. It should be used to define the sorting direction of the index. It may be set to either ascending or descending.

Not all DBMS support index sorting direction configuration. The DBMS drivers of those that do not support it ignore this property. Use the function supports() to determine whether the DBMS driver can manage indexes.

Example array( 'fields' => array( 'user_name' => array( 'sorting' => 'ascending' ), 'last_login' => array() ) )


API Tags:
Access:  public


[ Top ]
createIndexSql  [line 420]

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

Get the stucture of a field into an array

Parameters:
string   $table:  name of the table on which the index is to be created
string   $name:  name of the index to be created
array   $definition:  associative array that defines properties of the index to be created.

API Tags:
See:  Doctrine_Export::createIndex()
Access:  public


Redefined in descendants as:

[ Top ]
createSequence  [line 287]

  void createSequence( string $seqName, [string $start = 1], [ $options = array()]  )

create sequence

Parameters:
string   $seqName:  name of the sequence to be created
string   $start:  start value of the sequence; default is 1
array   $options:  An associative array of table options: array( 'comment' => 'Foo', 'charset' => 'utf8', 'collate' => 'utf8_unicode_ci', );

API Tags:
Access:  public

Information Tags:
Throws:  Doctrine_Connection_Exception if something fails at database level

Redefined in descendants as:

[ Top ]
createSequenceSql  [line 306]

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

return RDBMS specific create sequence statement (this method is implemented by the drivers)

Parameters:
string   $seqName:  name of the sequence to be created
string   $start:  start value of the sequence; default is 1
array   $options:  An associative array of table options: array( 'comment' => 'Foo', 'charset' => 'utf8', 'collate' => 'utf8_unicode_ci', );

API Tags:
Access:  public

Information Tags:
Throws:  Doctrine_Connection_Exception if something fails at database level

Redefined in descendants as:

[ Top ]
createTable  [line 265]

  void createTable( string $name, $fields, [ $options = array()]  )

create a new table

Parameters:
string   $name:  Name of the database that should be created
array   $fields:  Associative array that contains the definition of each field of the new table
array   $options:  An associative array of table options:

API Tags:
See:  Doctrine_Export::createTableSql()
Access:  public


Redefined in descendants as:

[ Top ]
createTableSql  [line 208]

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

create a new table

Parameters:
string   $name:  Name of the database that should be created
array   $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 associative arrays like those that are meant to be passed with the field definitions to get[Type]Declaration() functions. array( 'id' => array( 'type' => 'integer', 'unsigned' => 1 'notnull' => 1 'default' => 0 ), 'name' => array( 'type' => 'text', 'length' => 12 ), 'password' => array( 'type' => 'text', 'length' => 12 ) );
array   $options:  An associative array of table options:

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
dropConstraint  [line 127]

  void dropConstraint( string $table, string $name, [string $primary = false]  )

drop existing constraint

Parameters:
string   $table:  name of table that should be used in method
string   $name:  name of the constraint to be dropped
string   $primary:  hint if the constraint is primary

API Tags:
Access:  public


[ Top ]
dropDatabase  [line 57]

  void dropDatabase( $database, string $name  )

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

Parameters:
string   $name:  name of the database that should be dropped
   $database: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
dropDatabaseSql  [line 68]

  void dropDatabaseSql( $database, string $name  )

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

Parameters:
string   $name:  name of the database that should be dropped
   $database: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
dropIndex  [line 102]

  void dropIndex( string $table, string $name  )

drop existing index

Parameters:
string   $table:  name of table that should be used in method
string   $name:  name of the index to be dropped

API Tags:
Access:  public


[ Top ]
dropIndexSql  [line 114]

  string dropIndexSql( string $table, string $name  )

dropIndexSql

Parameters:
string   $table:  name of table that should be used in method
string   $name:  name of the index to be dropped

API Tags:
Return:  SQL that is used for dropping an index
Access:  public


Redefined in descendants as:

[ Top ]
dropSequence  [line 142]

  void dropSequence( string $sequenceName  )

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

Parameters:
string   $sequenceName:  name of the sequence to be dropped

API Tags:
Access:  public

Information Tags:
Throws:  Doctrine_Connection_Exception if something fails at database level

[ Top ]
dropSequenceSql  [line 154]

  void dropSequenceSql( string $sequenceName  )

dropSequenceSql drop existing sequence

Parameters:
string   $sequenceName:  name of the sequence to be dropped

API Tags:
Access:  public

Information Tags:
Throws:  Doctrine_Connection_Exception if something fails at database level

Redefined in descendants as:

[ Top ]
dropTable  [line 90]

  void dropTable( string $table  )

dropTable drop an existing table

Parameters:
string   $table:  name of table that should be dropped from the database

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
dropTableSql  [line 79]

  string dropTableSql( string $table  )

dropTableSql drop an existing table

Parameters:
string   $table:  name of table that should be dropped from the database

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
exportClasses  [line 1002]

  void exportClasses( $classes  )

exportClasses method for exporting Doctrine_Record classes to a schema

Parameters:
array   $classes: 

API Tags:
Access:  public

Information Tags:
Throws:  Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation

[ Top ]
exportClassesSql  [line 1030]

  void exportClassesSql( $classes  )

exportClassesSql method for exporting Doctrine_Record classes to a schema

Parameters:
array   $classes: 

API Tags:
Access:  public

Information Tags:
Throws:  Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation

[ Top ]
exportSchema  [line 974]

  void exportSchema( [string $directory = null]  )

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 not abstract classes

Parameters:
string   $directory:  optional directory parameter

API Tags:
Access:  public

Information Tags:
Throws:  Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation

[ Top ]
exportSql  [line 1080]

  void exportSql( [string $directory = null]  )

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 not abstract classes

Parameters:
string   $directory:  optional directory parameter

API Tags:
Access:  public

Information Tags:
Throws:  Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation

[ Top ]
exportTable  [line 1110]

  boolean exportTable( Doctrine_Table $table  )

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

Parameters:
Doctrine_Table   $table: 

API Tags:
Return:  whether or not the export operation was successful false if table already existed in the database
Access:  public

Information Tags:
Throws:  Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS occurred during the create table operation

[ Top ]
getAdvancedForeignKeyOptions  [line 848]

  string getAdvancedForeignKeyOptions( $definition  )

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

Parameters:
array   $definition:  foreign key definition

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
getCharsetFieldDeclaration  [line 943]

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

Parameters:
string   $charset:  name of the charset

API Tags:
Return:  DBMS specific SQL code portion needed to set the CHARACTER SET of a field declaration.
Access:  public


[ Top ]
getCheckDeclaration  [line 704]

  string getCheckDeclaration( $definition  )

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

Parameters:
array   $definition:  check definition

API Tags:
Return:  DBMS specific SQL code portion needed to set a CHECK constraint
Access:  public


[ Top ]
getCollationFieldDeclaration  [line 955]

  string getCollationFieldDeclaration( string $collation  )

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

Parameters:
string   $collation:  name of the collation

API Tags:
Return:  DBMS specific SQL code portion needed to set the COLLATION of a field declaration.
Access:  public


[ Top ]
getDeclaration  [line 640]

  string getDeclaration( string $name, $field  )

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

Parameters:
string   $name:  name the field to be declared.
array   $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 value that determines the maximum length of the text field. If this argument is missing the field should be declared to have the longest length allowed by the DBMS.

default Text value to be used as default for this field.

notnull Boolean flag that indicates whether this field is constrained to not be set to null. charset Text value with the default CHARACTER SET for this field. collation Text value with the default COLLATION for this field. unique unique constraint check column check constraint


API Tags:
Return:  DBMS specific SQL code portion that should be used to declare the specified field.
Access:  public


[ Top ]
getDefaultFieldDeclaration  [line 676]

  string getDefaultFieldDeclaration( array $field  )

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

Parameters:
array   $field:  field definition array

API Tags:
Return:  DBMS specific SQL code portion needed to set a default value
Access:  public


Redefined in descendants as:

[ Top ]
getFieldDeclarationList  [line 599]

  string getFieldDeclarationList( $fields  )

Get declaration of a number of field in bulk

Parameters:
array   $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. Currently, the types of supported field properties are as follows:

length Integer value that determines the maximum length of the text field. If this argument is missing the field should be declared to have the longest length allowed by the DBMS.

default Text value to be used as default for this field.

notnull Boolean flag that indicates whether this field is constrained to not be set to null. charset Text value with the default CHARACTER SET for this field. collation Text value with the default COLLATION for this field. unique unique constraint


API Tags:
Access:  public


[ Top ]
getForeignKeyBaseDeclaration  [line 892]

  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.

Parameters:
array   $definition: 

API Tags:
Access:  public


[ Top ]
getForeignKeyDeclaration  [line 833]

  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.

Parameters:
array   $definition: 

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

local the local field(s)

foreign the foreign reference field(s)

foreignTable the name of the foreign table

onDelete referential delete action

onUpdate referential update action

deferred deferred constraint checking

The onDelete and onUpdate keys accept the following values:

CASCADE: Delete or update the row from the parent table and automatically delete or update the matching rows in the child table. Both ON DELETE CASCADE and ON UPDATE CASCADE are supported. Between two tables, you should not define several ON UPDATE CASCADE clauses that act on the same column in the parent table or in the child table.

SET NULL: Delete or update the row from the parent table and set the foreign key column or columns in the child table to NULL. This is valid only if the foreign key columns do not have the NOT NULL qualifier specified. Both ON DELETE SET NULL and ON UPDATE SET NULL clauses are supported.

NO ACTION: In standard SQL, NO ACTION means no action in the sense that an attempt to delete or update a primary key value is not allowed to proceed if there is a related foreign key value in the referenced table.

RESTRICT: Rejects the delete or update operation for the parent table. NO ACTION and RESTRICT are the same as omitting the ON DELETE or ON UPDATE clause.

SET DEFAULT


API Tags:
Return:  DBMS specific SQL code portion needed to set the FOREIGN KEY constraint of a field declaration.
Access:  public


[ Top ]
getForeignKeyReferentialAction  [line 869]

  void getForeignKeyReferentialAction( string $action, string 1  )

getForeignKeyReferentialAction

returns given referential action in uppercase if valid, otherwise throws an exception

Parameters:
string   $action:  foreign key referential action
string   1:  foreign key referential action in uppercase

API Tags:
Access:  public

Information Tags:
Throws:  Doctrine_Exception_Exception if unknown referential action given

[ Top ]
getIndexDeclaration  [line 731]

  string getIndexDeclaration( string $name, $definition  )

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

Parameters:
string   $name:  name of the index
array   $definition:  index definition

API Tags:
Return:  DBMS specific SQL code portion needed to set an index
Access:  public


Redefined in descendants as:

[ Top ]
getIndexFieldDeclarationList  [line 761]

  string getIndexFieldDeclarationList( $fields  )

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

Parameters:
array   $fields: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
getTemporaryTableQuery  [line 787]

  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 that requires a different SQL command from "CREATE TEMPORARY TABLE".


API Tags:
Return:  The string required to be placed between "CREATE" and "TABLE" to generate a temporary table, if possible.
Access:  public


Redefined in descendants as:

[ Top ]
getUniqueFieldDeclaration  [line 931]

  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.


API Tags:
Return:  DBMS specific SQL code portion needed to set the UNIQUE constraint of a field declaration.
Access:  public


[ Top ]