TYPO3 CMS
TYPO3_6-2
|
Public Member Functions | |
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 | |
$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 164 of file adodb-datadict.inc.php.
ADODB_DataDict::_CreateSuffix | ( | $fname, | |
& | $ftype, | ||
$fnotnull, | |||
$fdefault, | |||
$fautoinc, | |||
$fconstraint, | |||
$funsigned | |||
) |
Definition at line 819 of file adodb-datadict.inc.php.
Referenced by _GenFields().
ADODB_DataDict::_DropAutoIncrement | ( | $tabname | ) |
Definition at line 857 of file adodb-datadict.inc.php.
Referenced by _TableSQL().
ADODB_DataDict::_GenFields | ( | $flds, | |
$widespacing = false |
|||
) |
Definition at line 595 of file adodb-datadict.inc.php.
References _array_change_key_case(), _CreateSuffix(), _GetSize(), ActualType(), debug(), Lens_ParseArgs(), and NameQuote().
Referenced by ADODB2_sybase\AddColumnSQL(), ADODB2_sapdb\AddColumnSQL(), ADODB2_mssql\AddColumnSQL(), ADODB2_oci8\AddColumnSQL(), ADODB2_postgres\AddColumnSQL(), ADODB2_mssqlnative\AddColumnSQL(), AddColumnSQL(), ADODB2_sybase\AlterColumnSQL(), ADODB2_sapdb\AlterColumnSQL(), ADODB2_oci8\AlterColumnSQL(), ADODB2_postgres\AlterColumnSQL(), AlterColumnSQL(), ADODB2_db2\ChangeTableSQL(), ChangeTableSQL(), CreateTableSQL(), and RenameColumnSQL().
ADODB_DataDict::_GetSize | ( | $ftype, | |
$ty, | |||
$fsize, | |||
$fprec | |||
) |
GENERATE THE SIZE PART OF THE DATATYPE $ftype is the actual type $ty is the type defined originally in the DDL
Definition at line 807 of file adodb-datadict.inc.php.
Referenced by _GenFields().
ADODB_DataDict::_getSizePrec | ( | $size | ) |
Definition at line 919 of file adodb-datadict.inc.php.
Referenced by ChangeTableSQL().
ADODB_DataDict::_IndexSQL | ( | $idxname, | |
$tabname, | |||
$flds, | |||
$idxoptions | |||
) |
Definition at line 828 of file adodb-datadict.inc.php.
References $sql.
Referenced by CreateIndexSQL().
ADODB_DataDict::_Options | ( | $opts | ) |
Sanitize options, so that array elements with no keys are promoted to keys
Definition at line 907 of file adodb-datadict.inc.php.
Referenced by ADODB2_firebird\CreateDatabase(), ADODB2_oci8\CreateDatabase(), CreateDatabase(), CreateIndexSQL(), and CreateTableSQL().
ADODB_DataDict::_TableSQL | ( | $tabname, | |
$lines, | |||
$pkey, | |||
$tableoptions | |||
) |
Definition at line 862 of file adodb-datadict.inc.php.
References $sql, and _DropAutoIncrement().
Referenced by CreateTableSQL().
ADODB_DataDict::_Triggers | ( | $tabname, | |
$taboptions | |||
) |
GENERATE TRIGGERS IF NEEDED used when table has auto-incrementing field that is emulated using triggers
Definition at line 899 of file adodb-datadict.inc.php.
Referenced by CreateTableSQL().
ADODB_DataDict::ActualType | ( | $meta | ) |
Returns the actual type given a character code.
C: varchar X: CLOB (character large object) or largest varchar size if CLOB is not supported C2: Multibyte varchar X2: Multibyte CLOB
B: BLOB (binary large object)
D: Date T: Date-time L: Integer field suitable for storing booleans (0 or 1) I: Integer F: Floating point number N: Numeric or decimal number
Definition at line 407 of file adodb-datadict.inc.php.
Referenced by _GenFields().
ADODB_DataDict::AddColumnSQL | ( | $tabname, | |
$flds | |||
) |
Definition at line 452 of file adodb-datadict.inc.php.
References $sql, _GenFields(), and TableName().
ADODB_DataDict::AlterColumnSQL | ( | $tabname, | |
$flds, | |||
$tableflds = '' , |
|||
$tableoptions = '' |
|||
) |
Change the definition of one column
As some DBM's can't do that on there 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/string | $tableoptions='' options for the new table see CreateTableSQL, default '' |
Definition at line 483 of file adodb-datadict.inc.php.
References $sql, _GenFields(), and TableName().
ADODB_DataDict::ChangeTableSQL | ( | $tablename, | |
$flds, | |||
$tableoptions = false , |
|||
$dropOldFlds = false |
|||
) |
"Florian Buzin [ easywe ]" <florian.buzin::easywe.de>
This function changes/adds new fields to your table. You don't have to know if the col is new or not. It will check on its own.
Definition at line 939 of file adodb-datadict.inc.php.
References $sql, _GenFields(), _getSizePrec(), CreateTableSQL(), debug(), Lens_ParseArgs(), MetaColumns(), MetaType(), and TableName().
ADODB_DataDict::CreateDatabase | ( | $dbname, | |
$options = false |
|||
) |
Definition at line 412 of file adodb-datadict.inc.php.
References $sql, _Options(), and NameQuote().
ADODB_DataDict::CreateIndexSQL | ( | $idxname, | |
$tabname, | |||
$flds, | |||
$idxoptions = false |
|||
) |
Definition at line 428 of file adodb-datadict.inc.php.
References _IndexSQL(), _Options(), NameQuote(), and TableName().
Referenced by ADODB2_postgres\_recreate_copy_table().
ADODB_DataDict::CreateTableSQL | ( | $tabname, | |
$flds, | |||
$tableoptions = array() |
|||
) |
Generate the SQL to create table. Returns an array of sql strings.
Definition at line 563 of file adodb-datadict.inc.php.
References $sql, _GenFields(), _Options(), _TableSQL(), _Triggers(), and TableName().
Referenced by ADODB2_postgres\_recreate_copy_table(), ADODB2_db2\ChangeTableSQL(), and ChangeTableSQL().
ADODB_DataDict::DropColumnSQL | ( | $tabname, | |
$flds, | |||
$tableflds = '' , |
|||
$tableoptions = '' |
|||
) |
Drop one column
Some DBM's can't do that on there 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/string | $tableoptions='' options for the new table see CreateTableSQL, default '' |
Definition at line 538 of file adodb-datadict.inc.php.
References $sql, NameQuote(), and TableName().
Referenced by ADODB2_postgres\DropColumnSQL().
ADODB_DataDict::DropIndexSQL | ( | $idxname, | |
$tabname = NULL |
|||
) |
Definition at line 442 of file adodb-datadict.inc.php.
References NameQuote(), and TableName().
ADODB_DataDict::DropTableSQL | ( | $tabname | ) |
Definition at line 550 of file adodb-datadict.inc.php.
References TableName().
Referenced by ADODB2_postgres\DropTableSQL().
ADODB_DataDict::ExecuteSQLArray | ( | $sql, | |
$continueOnError = true |
|||
) |
Definition at line 370 of file adodb-datadict.inc.php.
References $conn, $connection, $sql, and debug().
ADODB_DataDict::GetCommentSQL | ( | $table, | |
$col | |||
) |
any varchar/char field this size or greater is treated as a blob in other words, we use a text area for editting.
Definition at line 184 of file adodb-datadict.inc.php.
ADODB_DataDict::MetaColumns | ( | $tab, | |
$upper = true , |
|||
$schema = false |
|||
) |
Definition at line 200 of file adodb-datadict.inc.php.
References TableName().
Referenced by ADODB2_postgres\_recreate_copy_table(), ADODB2_postgres\AlterColumnSQL(), ADODB2_db2\ChangeTableSQL(), and ChangeTableSQL().
ADODB_DataDict::MetaIndexes | ( | $table, | |
$primary = false , |
|||
$owner = false |
|||
) |
Definition at line 212 of file adodb-datadict.inc.php.
References TableName().
Referenced by ADODB2_postgres\_recreate_copy_table().
ADODB_DataDict::MetaPrimaryKeys | ( | $tab, | |
$owner = false , |
|||
$intkey = false |
|||
) |
Definition at line 206 of file adodb-datadict.inc.php.
References TableName().
ADODB_DataDict::MetaTables | ( | ) |
Definition at line 194 of file adodb-datadict.inc.php.
ADODB_DataDict::MetaType | ( | $t, | |
$len = -1 , |
|||
$fieldobj = false |
|||
) |
Definition at line 218 of file adodb-datadict.inc.php.
Referenced by ChangeTableSQL().
ADODB_DataDict::NameQuote | ( | $name = NULL , |
|
$allowBrackets = false |
|||
) |
Definition at line 332 of file adodb-datadict.inc.php.
Referenced by _GenFields(), CreateDatabase(), CreateIndexSQL(), ADODB2_sapdb\DropColumnSQL(), ADODB2_oci8\DropColumnSQL(), ADODB2_mssqlnative\DropColumnSQL(), DropColumnSQL(), DropIndexSQL(), RenameColumnSQL(), and TableName().
ADODB_DataDict::RenameColumnSQL | ( | $tabname, | |
$oldcolumn, | |||
$newcolumn, | |||
$flds = '' |
|||
) |
Rename one column
Some DBM's can only do this together with changeing the type of the column (even if that stays the same, eg. mysql)
string | $tabname | table-name |
string | $oldcolumn | column-name to be renamed |
string | $newcolumn | new column-name |
string | $flds,='' | complete column-defintion-string like for AddColumnSQL, only used by mysql atm., default='' |
Definition at line 514 of file adodb-datadict.inc.php.
References _GenFields(), NameQuote(), and TableName().
ADODB_DataDict::RenameTableSQL | ( | $tabname, | |
$newname | |||
) |
Definition at line 555 of file adodb-datadict.inc.php.
References TableName().
ADODB_DataDict::SetCommentSQL | ( | $table, | |
$col, | |||
$cmt | |||
) |
Definition at line 189 of file adodb-datadict.inc.php.
ADODB_DataDict::SetSchema | ( | $schema | ) |
Definition at line 447 of file adodb-datadict.inc.php.
References $schema.
ADODB_DataDict::TableName | ( | $name | ) |
Definition at line 361 of file adodb-datadict.inc.php.
References NameQuote().
Referenced by ADODB2_sybase\AddColumnSQL(), ADODB2_sapdb\AddColumnSQL(), ADODB2_mssql\AddColumnSQL(), ADODB2_oci8\AddColumnSQL(), ADODB2_postgres\AddColumnSQL(), ADODB2_mssqlnative\AddColumnSQL(), AddColumnSQL(), ADODB2_sybase\AlterColumnSQL(), ADODB2_sapdb\AlterColumnSQL(), ADODB2_oci8\AlterColumnSQL(), ADODB2_postgres\AlterColumnSQL(), AlterColumnSQL(), ADODB2_db2\ChangeTableSQL(), ChangeTableSQL(), CreateIndexSQL(), CreateTableSQL(), ADODB2_sybase\DropColumnSQL(), ADODB2_sapdb\DropColumnSQL(), ADODB2_mssql\DropColumnSQL(), ADODB2_oci8\DropColumnSQL(), ADODB2_mssqlnative\DropColumnSQL(), DropColumnSQL(), ADODB2_postgres\DropIndexSQL(), DropIndexSQL(), DropTableSQL(), MetaColumns(), MetaIndexes(), MetaPrimaryKeys(), RenameColumnSQL(), ADODB2_postgres\RenameTableSQL(), and RenameTableSQL().
ADODB_DataDict::$addCol = ' ADD' |
Definition at line 170 of file adodb-datadict.inc.php.
ADODB_DataDict::$alterCol = ' ALTER COLUMN' |
Definition at line 171 of file adodb-datadict.inc.php.
ADODB_DataDict::$autoIncrement = false |
Definition at line 178 of file adodb-datadict.inc.php.
ADODB_DataDict::$blobSize = 100 |
Definition at line 181 of file adodb-datadict.inc.php.
ADODB_DataDict::$connection |
Definition at line 165 of file adodb-datadict.inc.php.
Referenced by ExecuteSQLArray().
ADODB_DataDict::$dataProvider |
Definition at line 179 of file adodb-datadict.inc.php.
ADODB_DataDict::$debug = false |
Definition at line 166 of file adodb-datadict.inc.php.
ADODB_DataDict::$dropCol = ' DROP COLUMN' |
Definition at line 172 of file adodb-datadict.inc.php.
ADODB_DataDict::$dropIndex = 'DROP INDEX %s' |
Definition at line 169 of file adodb-datadict.inc.php.
ADODB_DataDict::$dropTable = 'DROP TABLE %s' |
Definition at line 167 of file adodb-datadict.inc.php.
ADODB_DataDict::$invalidResizeTypes4 = array('CLOB','BLOB','TEXT','DATE','TIME') |
Definition at line 180 of file adodb-datadict.inc.php.
ADODB_DataDict::$nameRegex = '\w' |
Definition at line 174 of file adodb-datadict.inc.php.
ADODB_DataDict::$nameRegexBrackets = 'a-zA-Z0-9_\(\)' |
Definition at line 175 of file adodb-datadict.inc.php.
ADODB_DataDict::$renameColumn = 'ALTER TABLE %s RENAME COLUMN %s TO %s' |
Definition at line 173 of file adodb-datadict.inc.php.
ADODB_DataDict::$renameTable = 'RENAME TABLE %s TO %s' |
Definition at line 168 of file adodb-datadict.inc.php.
ADODB_DataDict::$schema = false |
Definition at line 176 of file adodb-datadict.inc.php.
Referenced by ADODB2_postgres\RenameTableSQL(), and SetSchema().
ADODB_DataDict::$serverInfo = array() |
Definition at line 177 of file adodb-datadict.inc.php.