TYPO3 CMS
TYPO3_6-2
|
Public Member Functions | |
MetaType ($t, $len=-1, $fieldobj=false) | |
ActualType ($meta) | |
AddColumnSQL ($tabname, $flds) | |
DropIndexSQL ($idxname, $tabname=NULL) | |
AlterColumnSQL ($tabname, $flds, $tableflds='', $tableoptions='') | |
DropColumnSQL ($tabname, $flds, $tableflds='', $tableoptions='') | |
_recreate_copy_table ($tabname, $dropflds, $tableflds, $tableoptions='') | |
DropTableSQL ($tabname) | |
_CreateSuffix ($fname, &$ftype, $fnotnull, $fdefault, $fautoinc, $fconstraint, $funsigned) | |
_DropAutoIncrement ($tabname) | |
RenameTableSQL ($tabname, $newname) | |
_IndexSQL ($idxname, $tabname, $flds, $idxoptions) | |
_GetSize ($ftype, $ty, $fsize, $fprec) | |
![]() | |
GetCommentSQL ($table, $col) | |
SetCommentSQL ($table, $col, $cmt) | |
MetaTables () | |
MetaColumns ($tab, $upper=true, $schema=false) | |
MetaPrimaryKeys ($tab, $owner=false, $intkey=false) | |
MetaIndexes ($table, $primary=false, $owner=false) | |
MetaType ($t, $len=-1, $fieldobj=false) | |
NameQuote ($name=NULL, $allowBrackets=false) | |
TableName ($name) | |
ExecuteSQLArray ($sql, $continueOnError=true) | |
ActualType ($meta) | |
CreateDatabase ($dbname, $options=false) | |
CreateIndexSQL ($idxname, $tabname, $flds, $idxoptions=false) | |
DropIndexSQL ($idxname, $tabname=NULL) | |
SetSchema ($schema) | |
AddColumnSQL ($tabname, $flds) | |
AlterColumnSQL ($tabname, $flds, $tableflds='', $tableoptions='') | |
RenameColumnSQL ($tabname, $oldcolumn, $newcolumn, $flds='') | |
DropColumnSQL ($tabname, $flds, $tableflds='', $tableoptions='') | |
DropTableSQL ($tabname) | |
RenameTableSQL ($tabname, $newname) | |
CreateTableSQL ($tabname, $flds, $tableoptions=array()) | |
_GenFields ($flds, $widespacing=false) | |
_GetSize ($ftype, $ty, $fsize, $fprec) | |
_CreateSuffix ($fname, &$ftype, $fnotnull, $fdefault, $fautoinc, $fconstraint, $funsigned) | |
_IndexSQL ($idxname, $tabname, $flds, $idxoptions) | |
_DropAutoIncrement ($tabname) | |
_TableSQL ($tabname, $lines, $pkey, $tableoptions) | |
_Triggers ($tabname, $taboptions) | |
_Options ($opts) | |
_getSizePrec ($size) | |
ChangeTableSQL ($tablename, $flds, $tableoptions=false, $dropOldFlds=false) | |
Public Attributes | |
$databaseType = 'postgres' | |
$seqField = false | |
$seqPrefix = 'SEQ_' | |
$addCol = ' ADD COLUMN' | |
$quote = '"' | |
$renameTable = 'ALTER TABLE %s RENAME TO %s' | |
$dropTable = 'DROP TABLE %s CASCADE' | |
![]() | |
$connection | |
$debug = false | |
$dropTable = 'DROP TABLE %s' | |
$renameTable = 'RENAME TABLE %s TO %s' | |
$dropIndex = 'DROP INDEX %s' | |
$addCol = ' ADD' | |
$alterCol = ' ALTER COLUMN' | |
$dropCol = ' DROP COLUMN' | |
$renameColumn = 'ALTER TABLE %s RENAME COLUMN %s TO %s' | |
$nameRegex = '\w' | |
$nameRegexBrackets = 'a-zA-Z0-9_\(\)' | |
$schema = false | |
$serverInfo = array() | |
$autoIncrement = false | |
$dataProvider | |
$invalidResizeTypes4 = array('CLOB','BLOB','TEXT','DATE','TIME') | |
$blobSize = 100 | |
Definition at line 16 of file datadict-postgres.inc.php.
ADODB2_postgres::_CreateSuffix | ( | $fname, | |
& | $ftype, | ||
$fnotnull, | |||
$fdefault, | |||
$fautoinc, | |||
$fconstraint, | |||
$funsigned | |||
) |
Definition at line 365 of file datadict-postgres.inc.php.
ADODB2_postgres::_DropAutoIncrement | ( | $tabname | ) |
Definition at line 381 of file datadict-postgres.inc.php.
Referenced by DropTableSQL().
ADODB2_postgres::_GetSize | ( | $ftype, | |
$ty, | |||
$fsize, | |||
$fprec | |||
) |
Definition at line 473 of file datadict-postgres.inc.php.
ADODB2_postgres::_IndexSQL | ( | $idxname, | |
$tabname, | |||
$flds, | |||
$idxoptions | |||
) |
Definition at line 441 of file datadict-postgres.inc.php.
References $sql.
ADODB2_postgres::_recreate_copy_table | ( | $tabname, | |
$dropflds, | |||
$tableflds, | |||
$tableoptions = '' |
|||
) |
Save the content into a temp. table, drop and recreate the original table and copy the content back in
We also take care to set the values of the sequenz and recreate the indexes. All this is done in a transaction, to not loose the content of the table, if something went wrong!
Definition at line 308 of file datadict-postgres.inc.php.
References ADODB_DataDict\CreateIndexSQL(), ADODB_DataDict\CreateTableSQL(), DropTableSQL(), ADODB_DataDict\MetaColumns(), and ADODB_DataDict\MetaIndexes().
Referenced by AlterColumnSQL(), and DropColumnSQL().
ADODB2_postgres::ActualType | ( | $meta | ) |
Definition at line 90 of file datadict-postgres.inc.php.
ADODB2_postgres::AddColumnSQL | ( | $tabname, | |
$flds | |||
) |
Adding a new Column
reimplementation of the default function as postgres does NOT allow to set the default in the same statement
string | $tabname | table-name |
string | $flds | column-names and types for the changed columns |
Definition at line 129 of file datadict-postgres.inc.php.
References $sql, ADODB_DataDict\_GenFields(), and ADODB_DataDict\TableName().
ADODB2_postgres::AlterColumnSQL | ( | $tabname, | |
$flds, | |||
$tableflds = '' , |
|||
$tableoptions = '' |
|||
) |
Change the definition of one column
Postgres can't do that on it's own, you need to supply the complete defintion of the new table, to allow, recreating the table and copying the content over to the new table
string | $tabname | table-name |
string | $flds | column-name and type for the changed column |
string | $tableflds | complete defintion of the new table, eg. for postgres, default '' |
array/ | $tableoptions options for the new table see CreateTableSQL, default '' |
Definition at line 183 of file datadict-postgres.inc.php.
References $sql, ADODB_DataDict\_GenFields(), _recreate_copy_table(), debug(), ADODB_DataDict\MetaColumns(), and ADODB_DataDict\TableName().
ADODB2_postgres::DropColumnSQL | ( | $tabname, | |
$flds, | |||
$tableflds = '' , |
|||
$tableoptions = '' |
|||
) |
Drop one column
Postgres < 7.3 can't do that on it's own, you need to supply the complete defintion of the new table, to allow, recreating the table and copying the content over to the new table
string | $tabname | table-name |
string | $flds | column-name and type for the changed column |
string | $tableflds | complete defintion of the new table, eg. for postgres, default '' |
array/ | $tableoptions options for the new table see CreateTableSQL, default '' |
Definition at line 283 of file datadict-postgres.inc.php.
References _recreate_copy_table(), debug(), and ADODB_DataDict\DropColumnSQL().
ADODB2_postgres::DropIndexSQL | ( | $idxname, | |
$tabname = NULL |
|||
) |
Definition at line 157 of file datadict-postgres.inc.php.
References ADODB_DataDict\TableName().
ADODB2_postgres::DropTableSQL | ( | $tabname | ) |
Definition at line 354 of file datadict-postgres.inc.php.
References $sql, _DropAutoIncrement(), and ADODB_DataDict\DropTableSQL().
Referenced by _recreate_copy_table().
ADODB2_postgres::MetaType | ( | $t, | |
$len = -1 , |
|||
$fieldobj = false |
|||
) |
Definition at line 26 of file datadict-postgres.inc.php.
ADODB2_postgres::RenameTableSQL | ( | $tabname, | |
$newname | |||
) |
Definition at line 394 of file datadict-postgres.inc.php.
References ADODB_DataDict\$schema, and ADODB_DataDict\TableName().
ADODB2_postgres::$addCol = ' ADD COLUMN' |
Definition at line 21 of file datadict-postgres.inc.php.
ADODB2_postgres::$databaseType = 'postgres' |
Definition at line 18 of file datadict-postgres.inc.php.
ADODB2_postgres::$dropTable = 'DROP TABLE %s CASCADE' |
Definition at line 24 of file datadict-postgres.inc.php.
ADODB2_postgres::$quote = '"' |
Definition at line 22 of file datadict-postgres.inc.php.
ADODB2_postgres::$renameTable = 'ALTER TABLE %s RENAME TO %s' |
Definition at line 23 of file datadict-postgres.inc.php.
ADODB2_postgres::$seqField = false |
Definition at line 19 of file datadict-postgres.inc.php.
ADODB2_postgres::$seqPrefix = 'SEQ_' |
Definition at line 20 of file datadict-postgres.inc.php.