Öffentliche Methoden | |
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) | |
Öffentliche Methoden geerbt von ADODB_DataDict | |
GetCommentSQL ($table, $col) | |
in other words, we use a text area for editting. Mehr ... | |
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) | |
Datenfelder | |
$databaseType = 'postgres' | |
$seqField = false | |
$seqPrefix = 'SEQ_' | |
$addCol = ' ADD COLUMN' | |
$quote = '"' | |
$renameTable = 'ALTER TABLE %s RENAME TO %s' | |
$dropTable = 'DROP TABLE %s CASCADE' | |
Datenfelder geerbt von ADODB_DataDict | |
$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 | |
Definiert in Zeile 16 der Datei datadict-postgres.inc.php.
_CreateSuffix | ( | $fname, | |
& | $ftype, | ||
$fnotnull, | |||
$fdefault, | |||
$fautoinc, | |||
$fconstraint, | |||
$funsigned | |||
) |
Definiert in Zeile 365 der Datei datadict-postgres.inc.php.
_DropAutoIncrement | ( | $tabname) |
Definiert in Zeile 381 der Datei datadict-postgres.inc.php.
Wird benutzt von DropTableSQL().
_GetSize | ( | $ftype, | |
$ty, | |||
$fsize, | |||
$fprec | |||
) |
Definiert in Zeile 473 der Datei datadict-postgres.inc.php.
_IndexSQL | ( | $idxname, | |
$tabname, | |||
$flds, | |||
$idxoptions | |||
) |
Definiert in Zeile 441 der Datei datadict-postgres.inc.php.
_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!
Definiert in Zeile 308 der Datei datadict-postgres.inc.php.
Benutzt ADODB_DataDict\CreateIndexSQL(), ADODB_DataDict\CreateTableSQL(), DropTableSQL(), ADODB_DataDict\MetaColumns() und ADODB_DataDict\MetaIndexes().
Wird benutzt von AlterColumnSQL() und DropColumnSQL().
ActualType | ( | $meta) |
Definiert in Zeile 90 der Datei datadict-postgres.inc.php.
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 |
Definiert in Zeile 129 der Datei datadict-postgres.inc.php.
Benutzt ADODB_DataDict\_GenFields() und ADODB_DataDict\TableName().
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 '' |
Definiert in Zeile 183 der Datei datadict-postgres.inc.php.
Benutzt ADODB_DataDict\_GenFields(), _recreate_copy_table(), ADODB_DataDict\MetaColumns() und ADODB_DataDict\TableName().
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 '' |
Definiert in Zeile 283 der Datei datadict-postgres.inc.php.
Benutzt _recreate_copy_table() und ADODB_DataDict\DropColumnSQL().
DropIndexSQL | ( | $idxname, | |
$tabname = NULL |
|||
) |
Definiert in Zeile 157 der Datei datadict-postgres.inc.php.
Benutzt ADODB_DataDict\TableName().
DropTableSQL | ( | $tabname) |
Definiert in Zeile 354 der Datei datadict-postgres.inc.php.
Benutzt _DropAutoIncrement() und ADODB_DataDict\DropTableSQL().
Wird benutzt von _recreate_copy_table().
MetaType | ( | $t, | |
$len = -1 , |
|||
$fieldobj = false |
|||
) |
Definiert in Zeile 26 der Datei datadict-postgres.inc.php.
RenameTableSQL | ( | $tabname, | |
$newname | |||
) |
Definiert in Zeile 394 der Datei datadict-postgres.inc.php.
Benutzt ADODB_DataDict\$schema und ADODB_DataDict\TableName().
$addCol = ' ADD COLUMN' |
Definiert in Zeile 21 der Datei datadict-postgres.inc.php.
$databaseType = 'postgres' |
Definiert in Zeile 18 der Datei datadict-postgres.inc.php.
$dropTable = 'DROP TABLE %s CASCADE' |
Definiert in Zeile 24 der Datei datadict-postgres.inc.php.
$quote = '"' |
Definiert in Zeile 22 der Datei datadict-postgres.inc.php.
$renameTable = 'ALTER TABLE %s RENAME TO %s' |
Definiert in Zeile 23 der Datei datadict-postgres.inc.php.
$seqField = false |
Definiert in Zeile 19 der Datei datadict-postgres.inc.php.
$seqPrefix = 'SEQ_' |
Definiert in Zeile 20 der Datei datadict-postgres.inc.php.