ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
This class includes methods that help to abstract ILIAS 3.10.x MySQL tables for the use with MDB2 abstraction layer and full compliance mode support. More...
Public Member Functions | |
__construct () | |
Constructor. More... | |
setTestMode ($a_testmode) | |
getTestMode () | |
performAbstraction ($a_table_name, $a_set_text_ts_fields_notnull_false=true) | |
Converts an existing (MySQL) ILIAS table in an abstract table. More... | |
countRecords ($a_table_name) | |
Check number of records before and after. More... | |
storeStep ($a_table, $a_step) | |
Store performed step. More... | |
replaceEmptyStringsWithNull ($a_table) | |
Replace empty strings with null values. More... | |
replaceEmptyDatesWithNull ($a_table) | |
Replace empty dates with null. More... | |
lowerCaseTableName ($a_table_name) | |
Lower case table and field names. More... | |
lowerCaseColumnNames ($a_table_name) | |
lower case column names More... | |
removeAutoIncrement ($a_table_name, $a_auto_inc_field) | |
Remove auto_increment attribute of a field. More... | |
removePrimaryKey ($a_table, $a_pk) | |
Remove primary key from table. More... | |
removeIndices ($a_table, $a_indices) | |
Remove Indices. More... | |
removeConstraints ($a_table, $a_constraints) | |
Remove Constraints. More... | |
alterTable ($a_table, $a_fields, $a_set_text_ts_fields_notnull_false=true, $pk="") | |
addPrimaryKey ($a_table, $a_pk) | |
addIndices ($a_table, $a_indices) | |
Add indices. More... | |
addConstraints ($a_table, $a_constraints) | |
Add constraints. More... | |
fixIndexNames ($a_table) | |
This is only used on tables that have already been abstracted but missed the "full treatment". More... | |
addAutoIncrementSequence ($a_table, $a_auto_inc_field) | |
Add autoincrement sequence. More... | |
fixClobNotNull ($a_table) | |
This is only used on tables that have already been abstracted but missed the "full treatment". More... | |
fixDatetimeValues ($a_table) | |
This is only used on tables that have already been abstracted but missed the "full treatment". More... | |
Data Fields | |
$analyzer | |
Protected Attributes | |
$ilDBInterface | |
$manager | |
$reverse | |
$testmode | |
This class includes methods that help to abstract ILIAS 3.10.x MySQL tables for the use with MDB2 abstraction layer and full compliance mode support.
Definition at line 12 of file class.ilMySQLAbstraction.php.
ilMySQLAbstraction::__construct | ( | ) |
Constructor.
Definition at line 40 of file class.ilMySQLAbstraction.php.
References $DIC, $ilDB, ilDBConstants\MODULE_MANAGER, ilDBConstants\MODULE_REVERSE, and setTestMode().
ilMySQLAbstraction::addAutoIncrementSequence | ( | $a_table, | |
$a_auto_inc_field | |||
) |
Add autoincrement sequence.
string | table name |
string | autoincrement field |
Definition at line 636 of file class.ilMySQLAbstraction.php.
Referenced by performAbstraction().
ilMySQLAbstraction::addConstraints | ( | $a_table, | |
$a_constraints | |||
) |
Add constraints.
string | table name |
array | constraints information |
Definition at line 575 of file class.ilMySQLAbstraction.php.
Referenced by performAbstraction().
ilMySQLAbstraction::addIndices | ( | $a_table, | |
$a_indices | |||
) |
Add indices.
string | table name |
array | indices information |
Definition at line 540 of file class.ilMySQLAbstraction.php.
Referenced by fixIndexNames(), and performAbstraction().
ilMySQLAbstraction::addPrimaryKey | ( | $a_table, | |
$a_pk | |||
) |
$a_table | |
$a_pk |
Definition at line 522 of file class.ilMySQLAbstraction.php.
References $f.
Referenced by performAbstraction().
ilMySQLAbstraction::alterTable | ( | $a_table, | |
$a_fields, | |||
$a_set_text_ts_fields_notnull_false = true , |
|||
$pk = "" |
|||
) |
$a_table | ||
$a_fields | ||
bool | $a_set_text_ts_fields_notnull_false | |
string | $pk |
Definition at line 419 of file class.ilMySQLAbstraction.php.
References $d, $def, $r, and getTestMode().
Referenced by performAbstraction().
ilMySQLAbstraction::countRecords | ( | $a_table_name | ) |
Check number of records before and after.
string | $a_table_name |
Definition at line 205 of file class.ilMySQLAbstraction.php.
References $DIC, $ilDB, and $res.
Referenced by performAbstraction().
ilMySQLAbstraction::fixClobNotNull | ( | $a_table | ) |
This is only used on tables that have already been abstracted but missed the "full treatment".
Definition at line 651 of file class.ilMySQLAbstraction.php.
ilMySQLAbstraction::fixDatetimeValues | ( | $a_table | ) |
This is only used on tables that have already been abstracted but missed the "full treatment".
Definition at line 677 of file class.ilMySQLAbstraction.php.
References $def, $name, and $nd.
ilMySQLAbstraction::fixIndexNames | ( | $a_table | ) |
This is only used on tables that have already been abstracted but missed the "full treatment".
Definition at line 608 of file class.ilMySQLAbstraction.php.
References $index, and addIndices().
ilMySQLAbstraction::getTestMode | ( | ) |
Definition at line 70 of file class.ilMySQLAbstraction.php.
References $testmode.
Referenced by alterTable(), and performAbstraction().
ilMySQLAbstraction::lowerCaseColumnNames | ( | $a_table_name | ) |
lower case column names
string | $a_table_name |
Definition at line 334 of file class.ilMySQLAbstraction.php.
References $DIC, $ilDB, $result, and $row.
Referenced by performAbstraction().
ilMySQLAbstraction::lowerCaseTableName | ( | $a_table_name | ) |
Lower case table and field names.
string | $a_table_name |
Definition at line 315 of file class.ilMySQLAbstraction.php.
Referenced by performAbstraction().
ilMySQLAbstraction::performAbstraction | ( | $a_table_name, | |
$a_set_text_ts_fields_notnull_false = true |
|||
) |
Converts an existing (MySQL) ILIAS table in an abstract table.
This means the table conforms to the MDB2 field types, uses sequences instead of auto_increment.
string | $a_table_name | string |
bool | $a_set_text_ts_fields_notnull_false |
ilDatabaseException |
Definition at line 87 of file class.ilMySQLAbstraction.php.
References addAutoIncrementSequence(), addConstraints(), addIndices(), addPrimaryKey(), alterTable(), countRecords(), getTestMode(), lowerCaseColumnNames(), lowerCaseTableName(), removeAutoIncrement(), removeConstraints(), removeIndices(), removePrimaryKey(), replaceEmptyDatesWithNull(), replaceEmptyStringsWithNull(), and storeStep().
ilMySQLAbstraction::removeAutoIncrement | ( | $a_table_name, | |
$a_auto_inc_field | |||
) |
Remove auto_increment attribute of a field.
string | table name |
string | autoincrement field |
Definition at line 354 of file class.ilMySQLAbstraction.php.
Referenced by performAbstraction().
ilMySQLAbstraction::removeConstraints | ( | $a_table, | |
$a_constraints | |||
) |
Remove Constraints.
string | table name |
array | constraints information |
Definition at line 398 of file class.ilMySQLAbstraction.php.
References $c.
Referenced by performAbstraction().
ilMySQLAbstraction::removeIndices | ( | $a_table, | |
$a_indices | |||
) |
Remove Indices.
string | table name |
array | indices information |
Definition at line 382 of file class.ilMySQLAbstraction.php.
References $index.
Referenced by performAbstraction().
ilMySQLAbstraction::removePrimaryKey | ( | $a_table, | |
$a_pk | |||
) |
Remove primary key from table.
string | table name |
array | primary key information |
Definition at line 368 of file class.ilMySQLAbstraction.php.
Referenced by performAbstraction().
ilMySQLAbstraction::replaceEmptyDatesWithNull | ( | $a_table | ) |
Replace empty dates with null.
$a_table |
Definition at line 277 of file class.ilMySQLAbstraction.php.
References $def, $DIC, and $ilDB.
Referenced by performAbstraction().
ilMySQLAbstraction::replaceEmptyStringsWithNull | ( | $a_table | ) |
Replace empty strings with null values.
$a_table |
Definition at line 250 of file class.ilMySQLAbstraction.php.
References $def, $DIC, and $ilDB.
Referenced by performAbstraction().
ilMySQLAbstraction::setTestMode | ( | $a_testmode | ) |
$a_testmode |
Definition at line 61 of file class.ilMySQLAbstraction.php.
Referenced by __construct().
ilMySQLAbstraction::storeStep | ( | $a_table, | |
$a_step | |||
) |
Store performed step.
$a_table | |
$a_step |
Definition at line 224 of file class.ilMySQLAbstraction.php.
Referenced by performAbstraction().
ilMySQLAbstraction::$analyzer |
Definition at line 18 of file class.ilMySQLAbstraction.php.
|
protected |
Definition at line 22 of file class.ilMySQLAbstraction.php.
|
protected |
Definition at line 26 of file class.ilMySQLAbstraction.php.
|
protected |
Definition at line 30 of file class.ilMySQLAbstraction.php.
|
protected |
Definition at line 34 of file class.ilMySQLAbstraction.php.
Referenced by getTestMode().