ILIAS
release_8 Revision v8.19-1-g4e8f2f9140c
|
Class pdoDB. More...
Public Member Functions | |||
connect (bool $return_false_for_error=false) | |||
initHelpers () | |||
getFieldDefinition () | |||
setFieldDefinition (\ilDBPdoFieldDefinition $field_definition) | |||
createDatabase (string $a_name, string $a_charset="utf8", string $a_collation="") | |||
getLastErrorCode () | |||
initFromIniFile (?ilIniFile $ini=null) | |||
generateDSN () | |||
quoteIdentifier (string $identifier, bool $check_option=false) | |||
nextId (string $table_name) | |||
createTable (string $table_name, array $fields, bool $drop_table=false, bool $ignore_erros=false) | |||
checkColumnName (string $a_name) | |||
addPrimaryKey (string $table_name, array $primary_keys) | |||
dropIndexByFields (string $table_name, array $fields) | |||
getPrimaryKeyIdentifier () | |||
createSequence (string $table_name, int $start=1) | |||
tableExists (string $table_name) | |||
tableColumnExists (string $table_name, string $column_name) | |||
addTableColumn (string $table_name, string $column_name, array $attributes) | |||
dropTable (string $table_name, bool $error_if_not_existing=true) | |||
query (string $query) | |||
fetchAll (ilDBStatement $statement, int $fetch_mode=ilDBConstants::FETCHMODE_ASSOC) | |||
dropSequence (string $table_name) | |||
dropTableColumn (string $table_name, string $column_name) | |||
renameTableColumn (string $table_name, string $column_old_name, string $column_new_name) | |||
insert (string $table_name, array $values) | |||
fetchObject (ilDBStatement $query_result) | |||
update (string $table_name, array $columns, array $where) | |||
$where MUST contain existing columns only. More... | |||
manipulate (string $query) | |||
fetchAssoc (ilDBStatement $statement) | |||
numRows (ilDBStatement $statement) | |||
quote ($value, ?string $type=null) | |||
indexExistsByFields (string $table_name, array $fields) | |||
addIndex (string $table_name, array $fields, string $index_name='', bool $fulltext=false) | |||
addFulltextIndex (string $table, array $fields, string $a_name="in") | |||
dropFulltextIndex (string $a_table, string $a_name) | |||
Drop fulltext index. More... | |||
isFulltextIndex (string $a_table, string $a_name) | |||
Is index a fulltext index? More... | |||
getIndexName (string $index_name_base) | |||
getSequenceName (string $table_name) | |||
constraintName (string $a_table, string $a_constraint) | |||
Determine contraint name by table name and constraint name. More... | |||
getDSN () | |||
Get DSN. More... | |||
getDBType () | |||
Get DSN. More... | |||
setDBType (string $type) | |||
lockTables (array $tables) | |||
unlockTables () | |||
in (string $field, array $values, bool $negate=false, string $type="") | |||
queryF (string $query, array $types, array $values) | |||
manipulateF (string $query, array $types, array $values) | |||
useSlave (bool $bool) | |||
TODO. More... | |||
setLimit (int $limit, int $offset=0) | |||
Set the Limit for the next Query. More... | |||
like (string $column, string $type, string $value="?", bool $case_insensitive=true) | |||
now () | |||
replace (string $table, array $primary_keys, array $other_columns) | |||
Replace into method. More... | |||
equals (string $columns, $value, string $type, bool $emptyOrNull=false) | |||
getHost () | |||
setHost (string $host) | |||
getDbname () | |||
setDbname (string $dbname) | |||
getCharset () | |||
setCharset (string $charset) | |||
getUsername () | |||
setUsername (string $username) | |||
getPassword () | |||
setPassword (string $password) | |||
getPort () | |||
setPort (int $port) | |||
setDBUser (string $user) | |||
setDBPort (int $port) | |||
setDBPassword (string $password) | |||
setDBHost (string $host) | |||
upper (string $expression) | |||
lower (string $expression) | |||
substr (string $a_exp, int $a_pos=1, int $a_len=-1) | |||
prepareManip (string $query, ?array $types=null) | |||
prepare (string $query, ?array $types=null, ?array $result_types=null) | |||
enableResultBuffering (bool $a_status) | |||
supportsSlave () | |||
supportsFulltext () | |||
supportsTransactions () | |||
supports (string $feature) | |||
listTables () | |||
loadModule (string $module) | |||
getAllowedAttributes () | |||
| |||
sequenceExists (string $sequence) | |||
listSequences () | |||
concat (array $values, bool $allow_null=true) | |||
locate (string $needle, string $string, int $start_pos=1) | |||
modifyTableColumn (string $table, string $column, array $attributes) | |||
free (ilDBStatement $a_st) | |||
renameTable (string $name, string $new_name) | |||
checkTableName (string $a_name) | |||
beginTransaction () | |||
commit () | |||
rollback () | |||
dropIndex (string $a_table, string $a_name="i1") | |||
setStorageEngine (string $storage_engine) | |||
getStorageEngine () | |||
queryCol (string $query, int $type=PDO::FETCH_ASSOC, int $colnum=0) | |||
queryRow (string $query, ?array $types=null, int $fetchmode=ilDBConstants::FETCHMODE_DEFAULT) | |||
getServerVersion (bool $native=false) | |||
escape (string $value, bool $escape_wildcards=false) | |||
escapePattern (string $text) | |||
migrateAllTablesToEngine (string $engine=ilDBConstants::MYSQL_ENGINE_INNODB) | |||
migrateAllTablesToCollation (string $collation=ilDBConstants::MYSQL_COLLATION_UTF8MB4) | |||
supportsCollationMigration () | |||
supportsEngineMigration () | |||
checkIndexName (string $name) | |||
addUniqueConstraint (string $table, array $fields, string $name="con") | |||
dropUniqueConstraint (string $table, string $name="con") | |||
dropUniqueConstraintByFields (string $table, array $fields) | |||
getLastInsertId () | |||
buildAtomQuery () | |||
uniqueConstraintExists (string $table, array $fields) | |||
dropPrimaryKey (string $table_name) | |||
executeMultiple (ilDBStatement $stmt, array $data) | |||
fromUnixtime (string $expr, bool $to_text=true) | |||
unixTimestamp () | |||
getDBVersion () | |||
sanitizeMB4StringIfNotSupported (string $query) | |||
| |||
doesCollationSupportMB4Strings () | |||
groupConcat (string $a_field_name, string $a_seperator=",", ?string $a_order=null) | |||
cast (string $a_field_name, string $a_dest_type) | |||
primaryExistsByFields (string $table_name, array $fields) | |||
![]() | |||
quote ($value, string $type) | |||
substr (string $expression) | |||
prepare (string $a_query, array $a_types=null, array $a_result_types=null) | |||
Prepare a query (SELECT) statement to be used with execute. More... | |||
execute (ilDBStatement $stmt, array $data=[]) | |||
![]() | |||
migrateTableToEngine (string $table_name, string $engine=ilDBConstants::MYSQL_ENGINE_INNODB) | |||
migrateTableCollation (string $table_name, string $collation=ilDBConstants::MYSQL_COLLATION_UTF8MB4) | |||
Static Public Member Functions | |
static | isReservedWord (string $a_word) |
![]() | |
static | getReservedWords () |
Get reserved words. More... | |
Data Fields | |
array | $options = [] |
const | FEATURE_TRANSACTIONS = 'transactions' |
const | FEATURE_FULLTEXT = 'fulltext' |
const | FEATURE_SLAVE = 'slave' |
Protected Member Functions | |
initSQLMode () | |
getAttributes () | |
getAdditionalAttributes () | |
checkTableColumns (array $a_cols) | |
checkColumn (string $a_col, array $a_def) | |
checkColumnDefinition (array $a_def, bool $a_modify_mode=false) | |
appendLimit (string $query) | |
Protected Attributes | |
string | $host = '' |
string | $dbname = '' |
string | $charset = 'utf8' |
string | $username = '' |
string | $password = '' |
int | $port = 3306 |
PDO | $pdo = null |
ilDBPdoManager | $manager |
ilDBPdoReverse | $reverse |
int | $limit = null |
int | $offset = null |
string | $storage_engine = 'InnoDB' |
string | $dsn = '' |
array | $attributes |
string | $db_type = '' |
int | $error_code = 0 |
ilDBPdoFieldDefinition | $field_definition = null |
Class pdoDB.
Definition at line 25 of file class.ilDBPdo.php.
ilDBPdo::addFulltextIndex | ( | string | $table, |
array | $fields, | ||
string | $a_name = "in" |
||
) |
Implements ilDBInterface.
Definition at line 659 of file class.ilDBPdo.php.
References constraintName(), and query().
Referenced by addIndex().
ilDBPdo::addIndex | ( | string | $table_name, |
array | $fields, | ||
string | $index_name = '' , |
||
bool | $fulltext = false |
||
) |
Implements ilDBInterface.
Definition at line 633 of file class.ilDBPdo.php.
References Vendor\Package\$f, addFulltextIndex(), constraintName(), and supportsFulltext().
ilDBPdo::addPrimaryKey | ( | string | $table_name, |
array | $primary_keys | ||
) |
Implements ilDBInterface.
Definition at line 232 of file class.ilDBPdo.php.
References Vendor\Package\$f, constraintName(), and getPrimaryKeyIdentifier().
ilDBPdo::addTableColumn | ( | string | $table_name, |
string | $column_name, | ||
array | $attributes | ||
) |
Implements ilDBInterface.
Definition at line 301 of file class.ilDBPdo.php.
References checkColumnDefinition(), and checkColumnName().
ilDBPdo::addUniqueConstraint | ( | string | $table, |
array | $fields, | ||
string | $name = "con" |
||
) |
Implements ilDBPdoInterface.
Definition at line 1345 of file class.ilDBPdo.php.
References Vendor\Package\$f, $manager, $name, checkIndexName(), constraintName(), and ilDBPdoManager\createConstraint().
|
protected |
Definition at line 1088 of file class.ilDBPdo.php.
References $limit, and $query.
Referenced by query().
ilDBPdo::beginTransaction | ( | ) |
Implements ilDBInterface.
Definition at line 1204 of file class.ilDBPdo.php.
References supports().
ilDBPdo::buildAtomQuery | ( | ) |
Implements ilDBInterface.
Definition at line 1398 of file class.ilDBPdo.php.
ilDBPdo::cast | ( | string | $a_field_name, |
string | $a_dest_type | ||
) |
Implements ilDBInterface.
Definition at line 1499 of file class.ilDBPdo.php.
|
protected |
Definition at line 211 of file class.ilDBPdo.php.
References checkColumnDefinition(), and checkColumnName().
Referenced by checkTableColumns().
|
protected |
Definition at line 219 of file class.ilDBPdo.php.
Referenced by addTableColumn(), checkColumn(), and modifyTableColumn().
ilDBPdo::checkColumnName | ( | string | $a_name | ) |
Definition at line 224 of file class.ilDBPdo.php.
Referenced by addTableColumn(), checkColumn(), and renameTableColumn().
ilDBPdo::checkIndexName | ( | string | $name | ) |
Implements ilDBPdoInterface.
Definition at line 1333 of file class.ilDBPdo.php.
References getFieldDefinition().
Referenced by addUniqueConstraint().
|
protected |
Definition at line 200 of file class.ilDBPdo.php.
References checkColumn().
Referenced by createTable().
ilDBPdo::checkTableName | ( | string | $a_name | ) |
Implements ilDBInterface.
Definition at line 1190 of file class.ilDBPdo.php.
Referenced by createTable(), and renameTable().
ilDBPdo::commit | ( | ) |
Implements ilDBInterface.
Definition at line 1216 of file class.ilDBPdo.php.
References supports().
ilDBPdo::concat | ( | array | $values, |
bool | $allow_null = true |
||
) |
Implements ilDBInterface.
Definition at line 1083 of file class.ilDBPdo.php.
ilDBPdo::connect | ( | bool | $return_false_for_error = false | ) |
Implements ilDBInterface.
Definition at line 58 of file class.ilDBPdo.php.
References Vendor\Package\$e, generateDSN(), getAttributes(), getDSN(), getPassword(), getUsername(), initHelpers(), and initSQLMode().
Referenced by createDatabase().
ilDBPdo::constraintName | ( | string | $a_table, |
string | $a_constraint | ||
) |
Determine contraint name by table name and constraint name.
In MySQL these are "unique" per table
Implements ilDBInterface.
Definition at line 707 of file class.ilDBPdo.php.
Referenced by addFulltextIndex(), addIndex(), addPrimaryKey(), addUniqueConstraint(), dropFulltextIndex(), and dropUniqueConstraint().
ilDBPdo::createDatabase | ( | string | $a_name, |
string | $a_charset = "utf8" , |
||
string | $a_collation = "" |
||
) |
Implements ilDBInterface.
Definition at line 108 of file class.ilDBPdo.php.
References Vendor\Package\$e, connect(), generateDSN(), query(), and setDbname().
ilDBPdo::createSequence | ( | string | $table_name, |
int | $start = 1 |
||
) |
Implements ilDBInterface.
Definition at line 275 of file class.ilDBPdo.php.
ilDBPdo::createTable | ( | string | $table_name, |
array | $fields, | ||
bool | $drop_table = false , |
||
bool | $ignore_erros = false |
||
) |
Implements ilDBInterface.
Definition at line 177 of file class.ilDBPdo.php.
References checkTableColumns(), checkTableName(), and dropTable().
ilDBPdo::doesCollationSupportMB4Strings | ( | ) |
Implements ilDBInterface.
Definition at line 1483 of file class.ilDBPdo.php.
Referenced by sanitizeMB4StringIfNotSupported().
ilDBPdo::dropFulltextIndex | ( | string | $a_table, |
string | $a_name | ||
) |
Drop fulltext index.
Implements ilDBInterface.
Definition at line 671 of file class.ilDBPdo.php.
References constraintName(), and query().
ilDBPdo::dropIndex | ( | string | $a_table, |
string | $a_name = "i1" |
||
) |
Implements ilDBInterface.
Definition at line 1237 of file class.ilDBPdo.php.
Referenced by dropIndexByFields().
ilDBPdo::dropIndexByFields | ( | string | $table_name, |
array | $fields | ||
) |
Implements ilDBInterface.
Definition at line 256 of file class.ilDBPdo.php.
References dropIndex().
ilDBPdo::dropPrimaryKey | ( | string | $table_name | ) |
Implements ilDBPdoInterface.
Definition at line 1424 of file class.ilDBPdo.php.
ilDBPdo::dropSequence | ( | string | $table_name | ) |
Implements ilDBInterface.
Definition at line 387 of file class.ilDBPdo.php.
ilDBPdo::dropTable | ( | string | $table_name, |
bool | $error_if_not_existing = true |
||
) |
Implements ilDBInterface.
Definition at line 322 of file class.ilDBPdo.php.
References loadModule(), and ilDBConstants\MODULE_MANAGER.
Referenced by createTable().
ilDBPdo::dropTableColumn | ( | string | $table_name, |
string | $column_name | ||
) |
ilDBPdo::dropUniqueConstraint | ( | string | $table, |
string | $name = "con" |
||
) |
Implements ilDBPdoInterface.
Definition at line 1367 of file class.ilDBPdo.php.
References $name, and constraintName().
Referenced by dropUniqueConstraintByFields().
ilDBPdo::dropUniqueConstraintByFields | ( | string | $table, |
array | $fields | ||
) |
Implements ilDBPdoInterface.
Definition at line 1372 of file class.ilDBPdo.php.
References $c, Vendor\Package\$f, and dropUniqueConstraint().
ilDBPdo::enableResultBuffering | ( | bool | $a_status | ) |
Implements ilDBInterface.
Definition at line 994 of file class.ilDBPdo.php.
References $data, ilDBStatement\execute(), and ilDBInterface\execute().
ilDBPdo::equals | ( | string | $columns, |
$value, | |||
string | $type, | ||
bool | $emptyOrNull = false |
||
) |
mixed | $value |
Implements ilDBInterface.
Definition at line 870 of file class.ilDBPdo.php.
References quote().
ilDBPdo::escape | ( | string | $value, |
bool | $escape_wildcards = false |
||
) |
Implements ilDBPdoInterface.
Definition at line 1294 of file class.ilDBPdo.php.
ilDBPdo::escapePattern | ( | string | $text | ) |
Implements ilDBPdoInterface.
Definition at line 1299 of file class.ilDBPdo.php.
ilDBPdo::executeMultiple | ( | ilDBStatement | $stmt, |
array | $data | ||
) |
ilDBStatement[] | $stmt |
Implements ilDBPdoInterface.
Definition at line 1429 of file class.ilDBPdo.php.
References ilDBInterface\execute().
ilDBPdo::fetchAll | ( | ilDBStatement | $statement, |
int | $fetch_mode = ilDBConstants::FETCHMODE_ASSOC |
||
) |
Implements ilDBInterface.
Definition at line 377 of file class.ilDBPdo.php.
References $data, and ilDBStatement\fetch().
ilDBPdo::fetchAssoc | ( | ilDBStatement | $statement | ) |
Implements ilDBInterface.
Definition at line 567 of file class.ilDBPdo.php.
References $res, and ilDBStatement\fetch().
Referenced by isFulltextIndex().
ilDBPdo::fetchObject | ( | ilDBStatement | $query_result | ) |
Implements ilDBInterface.
Definition at line 454 of file class.ilDBPdo.php.
References $res, and ilDBStatement\fetchObject().
Referenced by getDBVersion().
ilDBPdo::free | ( | ilDBStatement | $a_st | ) |
Implements ilDBInterface.
Definition at line 1151 of file class.ilDBPdo.php.
Referenced by update().
ilDBPdo::fromUnixtime | ( | string | $expr, |
bool | $to_text = true |
||
) |
Implements ilDBPdoInterface.
Definition at line 1437 of file class.ilDBPdo.php.
ilDBPdo::generateDSN | ( | ) |
Definition at line 155 of file class.ilDBPdo.php.
References $charset, getCharset(), getDbname(), getHost(), and getPort().
Referenced by connect(), createDatabase(), and initFromIniFile().
|
protected |
Definition at line 93 of file class.ilDBPdo.php.
Referenced by getAttributes().
ilDBPdo::getAllowedAttributes | ( | ) |
|
protected |
Definition at line 83 of file class.ilDBPdo.php.
References $attributes, $options, and getAdditionalAttributes().
Referenced by connect().
ilDBPdo::getCharset | ( | ) |
Definition at line 899 of file class.ilDBPdo.php.
References $charset.
Referenced by generateDSN().
ilDBPdo::getDbname | ( | ) |
Definition at line 889 of file class.ilDBPdo.php.
References $dbname.
Referenced by generateDSN().
ilDBPdo::getDBType | ( | ) |
Get DSN.
This must be overwritten in DBMS specific class.
Implements ilDBInterface.
Definition at line 717 of file class.ilDBPdo.php.
References $db_type.
ilDBPdo::getDBVersion | ( | ) |
ilDatabaseException |
Implements ilDBPdoInterface.
Definition at line 1451 of file class.ilDBPdo.php.
References $d, fetchObject(), and query().
ilDBPdo::getDSN | ( | ) |
Get DSN.
This must be overwritten in DBMS specific class.
Implements ilDBInterface.
Definition at line 712 of file class.ilDBPdo.php.
References $dsn.
Referenced by connect().
ilDBPdo::getFieldDefinition | ( | ) |
Definition at line 98 of file class.ilDBPdo.php.
References $field_definition.
Referenced by checkIndexName().
ilDBPdo::getHost | ( | ) |
Definition at line 879 of file class.ilDBPdo.php.
References $host.
Referenced by generateDSN().
ilDBPdo::getIndexName | ( | string | $index_name_base | ) |
Definition at line 693 of file class.ilDBPdo.php.
References ilDBPdoFieldDefinition\INDEX_FORMAT.
ilDBPdo::getLastErrorCode | ( | ) |
ilDBPdo::getLastInsertId | ( | ) |
Implements ilDBPdoInterface.
Definition at line 1393 of file class.ilDBPdo.php.
ilDBPdo::getPassword | ( | ) |
Definition at line 919 of file class.ilDBPdo.php.
References $password.
Referenced by connect().
ilDBPdo::getPort | ( | ) |
Definition at line 929 of file class.ilDBPdo.php.
References $port.
Referenced by generateDSN().
ilDBPdo::getPrimaryKeyIdentifier | ( | ) |
Implements ilDBInterface.
Definition at line 270 of file class.ilDBPdo.php.
Referenced by addPrimaryKey().
ilDBPdo::getSequenceName | ( | string | $table_name | ) |
Implements ilDBInterface.
Definition at line 698 of file class.ilDBPdo.php.
References ilDBPdoFieldDefinition\SEQUENCE_FORMAT.
Referenced by ilDBPdoMySQL\nextId(), and renameTable().
ilDBPdo::getServerVersion | ( | bool | $native = false | ) |
Implements ilDBPdoInterface.
Definition at line 1289 of file class.ilDBPdo.php.
ilDBPdo::getStorageEngine | ( | ) |
Implements ilDBInterface.
Definition at line 1247 of file class.ilDBPdo.php.
References $storage_engine.
ilDBPdo::getUsername | ( | ) |
Definition at line 909 of file class.ilDBPdo.php.
References $username.
Referenced by connect().
ilDBPdo::groupConcat | ( | string | $a_field_name, |
string | $a_seperator = "," , |
||
?string | $a_order = null |
||
) |
Implements ilDBInterface.
Definition at line 1491 of file class.ilDBPdo.php.
ilDBPdo::in | ( | string | $field, |
array | $values, | ||
bool | $negate = false , |
||
string | $type = "" |
||
) |
ilDBPdo::indexExistsByFields | ( | string | $table_name, |
array | $fields | ||
) |
ilDBPdo::initFromIniFile | ( | ?ilIniFile | $ini = null | ) |
Implements ilDBInterface.
Definition at line 133 of file class.ilDBPdo.php.
References $DIC, $ini, generateDSN(), setDbname(), setDBType(), setHost(), setPassword(), setPort(), and setUsername().
|
abstract |
|
protected |
Definition at line 79 of file class.ilDBPdo.php.
Referenced by connect().
ilDBPdo::insert | ( | string | $table_name, |
array | $values | ||
) |
Implements ilDBInterface.
Definition at line 437 of file class.ilDBPdo.php.
References ILIAS\LTI\ToolProvider\$key, $query, quote(), quoteIdentifier(), and sanitizeMB4StringIfNotSupported().
ilDBPdo::isFulltextIndex | ( | string | $a_table, |
string | $a_name | ||
) |
Is index a fulltext index?
Implements ilDBInterface.
Definition at line 681 of file class.ilDBPdo.php.
References fetchAssoc(), and query().
|
static |
Implements ilDBInterface.
Definition at line 1195 of file class.ilDBPdo.php.
References $DIC.
ilDBPdo::like | ( | string | $column, |
string | $type, | ||
string | $value = "?" , |
||
bool | $case_insensitive = true |
||
) |
ilDBPdo::listSequences | ( | ) |
Implements ilDBInterface.
Definition at line 1078 of file class.ilDBPdo.php.
Referenced by sequenceExists().
ilDBPdo::listTables | ( | ) |
Implements ilDBInterface.
Definition at line 1046 of file class.ilDBPdo.php.
Referenced by ilDBPdoMySQL\migrateAllTablesToEngine().
ilDBPdo::loadModule | ( | string | $module | ) |
Implements ilDBInterface.
Definition at line 1054 of file class.ilDBPdo.php.
References $manager, $reverse, ilDBConstants\MODULE_MANAGER, and ilDBConstants\MODULE_REVERSE.
Referenced by dropTable(), ilDBPdoMySQL\migrateAllTablesToCollation(), and tableColumnExists().
ilDBPdo::locate | ( | string | $needle, |
string | $string, | ||
int | $start_pos = 1 |
||
) |
Implements ilDBInterface.
Definition at line 1101 of file class.ilDBPdo.php.
ilDBPdo::lockTables | ( | array | $tables | ) |
Implements ilDBInterface.
Definition at line 750 of file class.ilDBPdo.php.
ilDBPdo::lower | ( | string | $expression | ) |
ilDBPdo::manipulate | ( | string | $query | ) |
ilDatabaseException |
Implements ilDBInterface.
Definition at line 547 of file class.ilDBPdo.php.
References $DIC, Vendor\Package\$e, $query, ILIAS\Repository\int(), and sanitizeMB4StringIfNotSupported().
Referenced by manipulateF().
ilDBPdo::manipulateF | ( | string | $query, |
array | $types, | ||
array | $values | ||
) |
string[] | $types |
ilDatabaseException |
Implements ilDBInterface.
Definition at line 793 of file class.ilDBPdo.php.
References manipulate(), and quote().
Referenced by replace(), and update().
ilDBPdo::migrateAllTablesToCollation | ( | string | $collation = ilDBConstants::MYSQL_COLLATION_UTF8MB4 | ) |
Implements ilDBPdoInterface.
Definition at line 1312 of file class.ilDBPdo.php.
ilDBPdo::migrateAllTablesToEngine | ( | string | $engine = ilDBConstants::MYSQL_ENGINE_INNODB | ) |
Implements ilDBPdoInterface.
Definition at line 1304 of file class.ilDBPdo.php.
ilDBPdo::modifyTableColumn | ( | string | $table, |
string | $column, | ||
array | $attributes | ||
) |
Implements ilDBInterface.
Definition at line 1109 of file class.ilDBPdo.php.
References Vendor\Package\$a, $field_definition, $type, and checkColumnDefinition().
|
abstract |
$table_name | string |
Implements ilDBInterface.
Referenced by quoteIdentifier().
ilDBPdo::now | ( | ) |
Implements ilDBInterface.
Definition at line 835 of file class.ilDBPdo.php.
Referenced by quote().
ilDBPdo::numRows | ( | ilDBStatement | $statement | ) |
Implements ilDBInterface.
Definition at line 579 of file class.ilDBPdo.php.
References ilDBStatement\rowCount().
ilDBPdo::prepare | ( | string | $query, |
?array | $types = null , |
||
?array | $result_types = null |
||
) |
Definition at line 989 of file class.ilDBPdo.php.
ilDBPdo::prepareManip | ( | string | $query, |
?array | $types = null |
||
) |
Implements ilDBInterface.
Definition at line 984 of file class.ilDBPdo.php.
Referenced by update().
ilDBPdo::primaryExistsByFields | ( | string | $table_name, |
array | $fields | ||
) |
ilDBPdo::query | ( | string | $query | ) |
ilDatabaseException |
Implements ilDBInterface.
Definition at line 348 of file class.ilDBPdo.php.
References $DIC, Vendor\Package\$e, $query, $res, appendLimit(), and ILIAS\Repository\int().
Referenced by addFulltextIndex(), createDatabase(), dropFulltextIndex(), getDBVersion(), isFulltextIndex(), ilDBPdoMySQL\nextId(), and queryF().
ilDBPdo::queryCol | ( | string | $query, |
int | $type = PDO::FETCH_ASSOC , |
||
int | $colnum = 0 |
||
) |
Implements ilDBPdoInterface.
Definition at line 1252 of file class.ilDBPdo.php.
References $type, ilDBConstants\FETCHMODE_ASSOC, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilDBPdoMySQL\migrateAllTablesToEngine().
ilDBPdo::queryF | ( | string | $query, |
array | $types, | ||
array | $values | ||
) |
string[] | $types |
Implements ilDBInterface.
Definition at line 775 of file class.ilDBPdo.php.
References query(), and quote().
ilDBPdo::queryRow | ( | string | $query, |
?array | $types = null , |
||
int | $fetchmode = ilDBConstants::FETCHMODE_DEFAULT |
||
) |
Implements ilDBPdoInterface.
Definition at line 1269 of file class.ilDBPdo.php.
References $type, ilDBConstants\FETCHMODE_ASSOC, and ilDBConstants\FETCHMODE_OBJECT.
ilDBPdo::quote | ( | $value, | |
?string | $type = null |
||
) |
Definition at line 584 of file class.ilDBPdo.php.
References $type, ILIAS\Repository\int(), now(), ilDBConstants\T_DATE, ilDBConstants\T_DATETIME, ilDBConstants\T_FLOAT, ilDBConstants\T_INTEGER, ilDBConstants\T_TEXT, and ilDBConstants\T_TIMESTAMP.
Referenced by equals(), insert(), manipulateF(), queryF(), and update().
ilDBPdo::quoteIdentifier | ( | string | $identifier, |
bool | $check_option = false |
||
) |
Implements ilDBInterface.
Definition at line 164 of file class.ilDBPdo.php.
References ILIAS\Repository\int(), and nextId().
Referenced by ilDBPdoManager\createConstraint(), insert(), ilDBPdoMySQL\nextId(), replace(), and update().
ilDBPdo::renameTable | ( | string | $name, |
string | $new_name | ||
) |
Implements ilDBInterface.
Definition at line 1159 of file class.ilDBPdo.php.
References Vendor\Package\$e, checkTableName(), getSequenceName(), and sequenceExists().
ilDBPdo::renameTableColumn | ( | string | $table_name, |
string | $column_old_name, | ||
string | $column_new_name | ||
) |
Implements ilDBInterface.
Definition at line 410 of file class.ilDBPdo.php.
References Vendor\Package\$f, and checkColumnName().
ilDBPdo::replace | ( | string | $table, |
array | $primary_keys, | ||
array | $other_columns | ||
) |
Replace into method.
string | table name |
array | primary key values: array("field1" => array("text", $name), "field2" => ...) |
array | other values: array("field1" => array("text", $name), "field2" => ...) |
Implements ilDBInterface.
Definition at line 840 of file class.ilDBPdo.php.
References ILIAS\Repository\int(), manipulateF(), and quoteIdentifier().
ilDBPdo::rollback | ( | ) |
Implements ilDBInterface.
Definition at line 1228 of file class.ilDBPdo.php.
References supports().
ilDBPdo::sanitizeMB4StringIfNotSupported | ( | string | $query | ) |
$query | string to sanitize, all MB4-Characters like emojis will re replaced with ??? |
Implements ilDBInterface.
Definition at line 1464 of file class.ilDBPdo.php.
References $query, doesCollationSupportMB4Strings(), and ilDBConstants\MB4_REPLACEMENT.
Referenced by insert(), manipulate(), and update().
ilDBPdo::sequenceExists | ( | string | $sequence | ) |
Implements ilDBInterface.
Definition at line 1073 of file class.ilDBPdo.php.
References listSequences().
Referenced by ilDBPdoMySQL\migrateAllTablesToEngine(), ilDBPdoMySQL\migrateTableToEngine(), and renameTable().
ilDBPdo::setCharset | ( | string | $charset | ) |
ilDBPdo::setDBHost | ( | string | $host | ) |
Implements ilDBInterface.
Definition at line 954 of file class.ilDBPdo.php.
References setHost().
ilDBPdo::setDbname | ( | string | $dbname | ) |
Definition at line 894 of file class.ilDBPdo.php.
References $dbname.
Referenced by createDatabase(), and initFromIniFile().
ilDBPdo::setDBPassword | ( | string | $password | ) |
Implements ilDBInterface.
Definition at line 949 of file class.ilDBPdo.php.
References setPassword().
ilDBPdo::setDBPort | ( | int | $port | ) |
Implements ilDBInterface.
Definition at line 944 of file class.ilDBPdo.php.
References setPort().
ilDBPdo::setDBType | ( | string | $type | ) |
Definition at line 722 of file class.ilDBPdo.php.
References $DIC, $ilDB, $type, and ilDBInterface\getReservedWords().
Referenced by initFromIniFile().
ilDBPdo::setDBUser | ( | string | $user | ) |
Implements ilDBInterface.
Definition at line 939 of file class.ilDBPdo.php.
References setUsername().
ilDBPdo::setFieldDefinition | ( | \ilDBPdoFieldDefinition | $field_definition | ) |
ilDBPdo::setHost | ( | string | $host | ) |
Definition at line 884 of file class.ilDBPdo.php.
References $host.
Referenced by initFromIniFile(), and setDBHost().
ilDBPdo::setLimit | ( | int | $limit, |
int | $offset = 0 |
||
) |
Set the Limit for the next Query.
Implements ilDBInterface.
Definition at line 818 of file class.ilDBPdo.php.
References $limit, and $offset.
ilDBPdo::setPassword | ( | string | $password | ) |
Definition at line 924 of file class.ilDBPdo.php.
References $password.
Referenced by initFromIniFile(), and setDBPassword().
ilDBPdo::setPort | ( | int | $port | ) |
Definition at line 934 of file class.ilDBPdo.php.
References $port.
Referenced by initFromIniFile(), and setDBPort().
ilDBPdo::setStorageEngine | ( | string | $storage_engine | ) |
Implements ilDBInterface.
Definition at line 1242 of file class.ilDBPdo.php.
References $storage_engine.
ilDBPdo::setUsername | ( | string | $username | ) |
Definition at line 914 of file class.ilDBPdo.php.
References $username.
Referenced by initFromIniFile(), and setDBUser().
ilDBPdo::substr | ( | string | $a_exp, |
int | $a_pos = 1 , |
||
int | $a_len = -1 |
||
) |
Definition at line 975 of file class.ilDBPdo.php.
ilDBPdo::supports | ( | string | $feature | ) |
Implements ilDBInterface.
Definition at line 1029 of file class.ilDBPdo.php.
References supportsFulltext(), supportsSlave(), and supportsTransactions().
Referenced by beginTransaction(), commit(), and rollback().
ilDBPdo::supportsCollationMigration | ( | ) |
Implements ilDBPdoInterface.
Definition at line 1320 of file class.ilDBPdo.php.
ilDBPdo::supportsEngineMigration | ( | ) |
Implements ilDBPdoInterface.
Definition at line 1325 of file class.ilDBPdo.php.
ilDBPdo::supportsFulltext | ( | ) |
Implements ilDBInterface.
Definition at line 1019 of file class.ilDBPdo.php.
Referenced by addIndex(), and supports().
ilDBPdo::supportsSlave | ( | ) |
Implements ilDBInterface.
Definition at line 1014 of file class.ilDBPdo.php.
Referenced by supports().
ilDBPdo::supportsTransactions | ( | ) |
Implements ilDBInterface.
Definition at line 1024 of file class.ilDBPdo.php.
Referenced by supports().
ilDBPdo::tableColumnExists | ( | string | $table_name, |
string | $column_name | ||
) |
Implements ilDBInterface.
Definition at line 291 of file class.ilDBPdo.php.
References loadModule(), and ilDBConstants\MODULE_MANAGER.
ilDBPdo::tableExists | ( | string | $table_name | ) |
Implements ilDBInterface.
Definition at line 281 of file class.ilDBPdo.php.
ilDBPdo::uniqueConstraintExists | ( | string | $table, |
array | $fields | ||
) |
Implements ilDBPdoInterface.
Definition at line 1403 of file class.ilDBPdo.php.
References $c, and Vendor\Package\$f.
ilDBPdo::unixTimestamp | ( | ) |
Implements ilDBPdoInterface.
Definition at line 1442 of file class.ilDBPdo.php.
ilDBPdo::unlockTables | ( | ) |
ilDBPdo::update | ( | string | $table_name, |
array | $values, | ||
array | $where | ||
) |
$where MUST contain existing columns only.
statements like [1 => ['integer', 1]] will not work, use a full query and
Implements ilDBInterface.
Definition at line 466 of file class.ilDBPdo.php.
References ilDBInterface\execute(), free(), ILIAS\Repository\int(), manipulateF(), prepareManip(), quote(), quoteIdentifier(), and sanitizeMB4StringIfNotSupported().
ilDBPdo::upper | ( | string | $expression | ) |
ilDBPdo::useSlave | ( | bool | $bool | ) |
|
protected |
Definition at line 47 of file class.ilDBPdo.php.
Referenced by getAttributes().
|
protected |
Definition at line 33 of file class.ilDBPdo.php.
Referenced by generateDSN(), getCharset(), and setCharset().
|
protected |
Definition at line 51 of file class.ilDBPdo.php.
Referenced by getDBType().
|
protected |
Definition at line 32 of file class.ilDBPdo.php.
Referenced by getDbname(), and setDbname().
|
protected |
Definition at line 43 of file class.ilDBPdo.php.
Referenced by getDSN().
|
protected |
Definition at line 52 of file class.ilDBPdo.php.
Referenced by getLastErrorCode().
|
protected |
Definition at line 53 of file class.ilDBPdo.php.
Referenced by getFieldDefinition(), modifyTableColumn(), and setFieldDefinition().
|
protected |
Definition at line 31 of file class.ilDBPdo.php.
|
protected |
Definition at line 40 of file class.ilDBPdo.php.
Referenced by appendLimit(), and setLimit().
|
protected |
Definition at line 38 of file class.ilDBPdo.php.
Referenced by addUniqueConstraint(), loadModule(), and ilDBPdoMySQL\migrateAllTablesToCollation().
|
protected |
Definition at line 41 of file class.ilDBPdo.php.
Referenced by setLimit().
array ilDBPdo::$options = [] |
Definition at line 27 of file class.ilDBPdo.php.
Referenced by getAttributes().
|
protected |
Definition at line 35 of file class.ilDBPdo.php.
Referenced by getPassword(), and setPassword().
|
protected |
Definition at line 37 of file class.ilDBPdo.php.
|
protected |
Definition at line 36 of file class.ilDBPdo.php.
|
protected |
Definition at line 39 of file class.ilDBPdo.php.
Referenced by loadModule().
|
protected |
Definition at line 42 of file class.ilDBPdo.php.
Referenced by getStorageEngine(), and setStorageEngine().
|
protected |
Definition at line 34 of file class.ilDBPdo.php.
Referenced by getUsername(), and setUsername().
const ilDBPdo::FEATURE_FULLTEXT = 'fulltext' |
Definition at line 29 of file class.ilDBPdo.php.
const ilDBPdo::FEATURE_SLAVE = 'slave' |
Definition at line 30 of file class.ilDBPdo.php.
const ilDBPdo::FEATURE_TRANSACTIONS = 'transactions' |
Definition at line 28 of file class.ilDBPdo.php.