ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
|
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) | |||
Prepare a query (SELECT) statement to be used with execute. More... | |||
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) | |||
addForeignKey (string $foreign_key_name, array $field_names, string $table_name, array $reference_field_names, string $reference_table, ?ForeignKeyConstraints $on_update=null, ?ForeignKeyConstraints $on_delete=null) | |||
dropForeignKey (string $foreign_key_name, string $table_name) | |||
foreignKeyExists (string $foreign_key_name, string $table_name) | |||
buildIntegrityAnalyser () | |||
primaryExistsByFields (string $table_name, array $fields) | |||
![]() | |||
quote ($value, string $type) | |||
substr (string $expression) | |||
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 |
array string | $db_type = '' |
int | $error_code = 0 |
ilDBPdoFieldDefinition | $field_definition = null |
Class pdoDB.
Definition at line 29 of file class.ilDBPdo.php.
ilDBPdo::addForeignKey | ( | string | $foreign_key_name, |
array | $field_names, | ||
string | $table_name, | ||
array | $reference_field_names, | ||
string | $reference_table, | ||
?ForeignKeyConstraints | $on_update = null , |
||
?ForeignKeyConstraints | $on_delete = null |
||
) |
string[] | $field_names |
string[] | $reference_field_names |
Implements ilDBInterface.
Definition at line 1487 of file class.ilDBPdo.php.
ilDBPdo::addFulltextIndex | ( | string | $table, |
array | $fields, | ||
string | $a_name = "in" |
||
) |
Implements ilDBInterface.
Definition at line 663 of file class.ilDBPdo.php.
References $q, constraintName(), and query().
Referenced by addIndex().
ilDBPdo::addIndex | ( | string | $table_name, |
array | $fields, | ||
string | $index_name = '' , |
||
bool | $fulltext = false |
||
) |
Implements ilDBInterface.
Definition at line 637 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 236 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 305 of file class.ilDBPdo.php.
References $attributes, checkColumnDefinition(), and checkColumnName().
ilDBPdo::addUniqueConstraint | ( | string | $table, |
array | $fields, | ||
string | $name = "con" |
||
) |
Implements ilDBPdoInterface.
Definition at line 1328 of file class.ilDBPdo.php.
References Vendor\Package\$f, $manager, checkIndexName(), constraintName(), and ilDBPdoManager\createConstraint().
|
protected |
Definition at line 1086 of file class.ilDBPdo.php.
Referenced by query().
ilDBPdo::beginTransaction | ( | ) |
Implements ilDBInterface.
Definition at line 1199 of file class.ilDBPdo.php.
References supports().
ilDBPdo::buildAtomQuery | ( | ) |
Implements ilDBInterface.
Definition at line 1381 of file class.ilDBPdo.php.
ilDBPdo::buildIntegrityAnalyser | ( | ) |
ilDBPdo::cast | ( | string | $a_field_name, |
string | $a_dest_type | ||
) |
Implements ilDBInterface.
Definition at line 1482 of file class.ilDBPdo.php.
|
protected |
Definition at line 215 of file class.ilDBPdo.php.
References checkColumnDefinition(), and checkColumnName().
Referenced by checkTableColumns().
|
protected |
Definition at line 223 of file class.ilDBPdo.php.
Referenced by addTableColumn(), checkColumn(), and modifyTableColumn().
ilDBPdo::checkColumnName | ( | string | $a_name | ) |
Definition at line 228 of file class.ilDBPdo.php.
Referenced by addTableColumn(), checkColumn(), and renameTableColumn().
ilDBPdo::checkIndexName | ( | string | $name | ) |
Implements ilDBPdoInterface.
Definition at line 1316 of file class.ilDBPdo.php.
References getFieldDefinition(), and null.
Referenced by addUniqueConstraint().
|
protected |
Definition at line 204 of file class.ilDBPdo.php.
References checkColumn().
Referenced by createTable().
ilDBPdo::checkTableName | ( | string | $a_name | ) |
Implements ilDBInterface.
Definition at line 1185 of file class.ilDBPdo.php.
Referenced by createTable(), and renameTable().
ilDBPdo::commit | ( | ) |
Implements ilDBInterface.
Definition at line 1211 of file class.ilDBPdo.php.
References supports().
ilDBPdo::concat | ( | array | $values, |
bool | $allow_null = true |
||
) |
Implements ilDBInterface.
Definition at line 1081 of file class.ilDBPdo.php.
ilDBPdo::connect | ( | bool | $return_false_for_error = false | ) |
Implements ilDBInterface.
Definition at line 62 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 711 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 112 of file class.ilDBPdo.php.
References connect(), generateDSN(), query(), and setDbname().
ilDBPdo::createSequence | ( | string | $table_name, |
int | $start = 1 |
||
) |
Implements ilDBInterface.
Definition at line 279 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 181 of file class.ilDBPdo.php.
References checkTableColumns(), checkTableName(), and dropTable().
ilDBPdo::doesCollationSupportMB4Strings | ( | ) |
Implements ilDBInterface.
Definition at line 1466 of file class.ilDBPdo.php.
Referenced by sanitizeMB4StringIfNotSupported().
ilDBPdo::dropForeignKey | ( | string | $foreign_key_name, |
string | $table_name | ||
) |
Implements ilDBInterface.
Definition at line 1499 of file class.ilDBPdo.php.
ilDBPdo::dropFulltextIndex | ( | string | $a_table, |
string | $a_name | ||
) |
Drop fulltext index.
Implements ilDBInterface.
Definition at line 675 of file class.ilDBPdo.php.
References constraintName(), and query().
ilDBPdo::dropIndex | ( | string | $a_table, |
string | $a_name = "i1" |
||
) |
Implements ilDBInterface.
Definition at line 1232 of file class.ilDBPdo.php.
Referenced by dropIndexByFields().
ilDBPdo::dropIndexByFields | ( | string | $table_name, |
array | $fields | ||
) |
Implements ilDBInterface.
Definition at line 260 of file class.ilDBPdo.php.
References dropIndex().
ilDBPdo::dropPrimaryKey | ( | string | $table_name | ) |
Implements ilDBPdoInterface.
Definition at line 1407 of file class.ilDBPdo.php.
ilDBPdo::dropSequence | ( | string | $table_name | ) |
Implements ilDBInterface.
Definition at line 391 of file class.ilDBPdo.php.
ilDBPdo::dropTable | ( | string | $table_name, |
bool | $error_if_not_existing = true |
||
) |
Implements ilDBInterface.
Definition at line 326 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 1350 of file class.ilDBPdo.php.
References constraintName().
Referenced by dropUniqueConstraintByFields().
ilDBPdo::dropUniqueConstraintByFields | ( | string | $table, |
array | $fields | ||
) |
Implements ilDBPdoInterface.
Definition at line 1355 of file class.ilDBPdo.php.
References $c, Vendor\Package\$f, and dropUniqueConstraint().
ilDBPdo::enableResultBuffering | ( | bool | $a_status | ) |
Implements ilDBInterface.
Definition at line 998 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 874 of file class.ilDBPdo.php.
References quote().
ilDBPdo::escape | ( | string | $value, |
bool | $escape_wildcards = false |
||
) |
Implements ilDBPdoInterface.
Definition at line 1277 of file class.ilDBPdo.php.
ilDBPdo::escapePattern | ( | string | $text | ) |
Implements ilDBPdoInterface.
Definition at line 1282 of file class.ilDBPdo.php.
ilDBPdo::executeMultiple | ( | ilDBStatement | $stmt, |
array | $data | ||
) |
ilDBStatement[] | $stmt |
Implements ilDBPdoInterface.
Definition at line 1412 of file class.ilDBPdo.php.
References ilDBInterface\execute().
ilDBPdo::fetchAll | ( | ilDBStatement | $statement, |
int | $fetch_mode = ilDBConstants::FETCHMODE_ASSOC |
||
) |
Implements ilDBInterface.
Definition at line 381 of file class.ilDBPdo.php.
References $data, and ilDBStatement\fetch().
ilDBPdo::fetchAssoc | ( | ilDBStatement | $statement | ) |
Implements ilDBInterface.
Definition at line 571 of file class.ilDBPdo.php.
References $res, ilDBStatement\fetch(), and null.
Referenced by isFulltextIndex().
ilDBPdo::fetchObject | ( | ilDBStatement | $query_result | ) |
Implements ilDBInterface.
Definition at line 458 of file class.ilDBPdo.php.
References $res, ilDBStatement\fetchObject(), and null.
Referenced by getDBVersion().
ilDBPdo::foreignKeyExists | ( | string | $foreign_key_name, |
string | $table_name | ||
) |
Implements ilDBInterface.
Definition at line 1504 of file class.ilDBPdo.php.
ilDBPdo::free | ( | ilDBStatement | $a_st | ) |
Implements ilDBInterface.
Definition at line 1149 of file class.ilDBPdo.php.
Referenced by update().
ilDBPdo::fromUnixtime | ( | string | $expr, |
bool | $to_text = true |
||
) |
Implements ilDBPdoInterface.
Definition at line 1420 of file class.ilDBPdo.php.
ilDBPdo::generateDSN | ( | ) |
Definition at line 159 of file class.ilDBPdo.php.
References $charset, getCharset(), getDbname(), getHost(), and getPort().
Referenced by connect(), createDatabase(), and initFromIniFile().
|
protected |
Definition at line 97 of file class.ilDBPdo.php.
Referenced by getAttributes().
ilDBPdo::getAllowedAttributes | ( | ) |
|
protected |
Definition at line 87 of file class.ilDBPdo.php.
References $attributes, $options, and getAdditionalAttributes().
Referenced by connect().
ilDBPdo::getCharset | ( | ) |
Definition at line 903 of file class.ilDBPdo.php.
References $charset.
Referenced by generateDSN().
ilDBPdo::getDbname | ( | ) |
Definition at line 893 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 721 of file class.ilDBPdo.php.
References $db_type.
ilDBPdo::getDBVersion | ( | ) |
ilDatabaseException |
Implements ilDBPdoInterface.
Definition at line 1434 of file class.ilDBPdo.php.
References Vendor\Package\$d, fetchObject(), null, and query().
ilDBPdo::getDSN | ( | ) |
Get DSN.
This must be overwritten in DBMS specific class.
Implements ilDBInterface.
Definition at line 716 of file class.ilDBPdo.php.
References $dsn.
Referenced by connect().
ilDBPdo::getFieldDefinition | ( | ) |
Definition at line 102 of file class.ilDBPdo.php.
References $field_definition.
Referenced by checkIndexName().
ilDBPdo::getHost | ( | ) |
Definition at line 883 of file class.ilDBPdo.php.
References $host.
Referenced by generateDSN().
ilDBPdo::getIndexName | ( | string | $index_name_base | ) |
Definition at line 697 of file class.ilDBPdo.php.
References ilDBPdoFieldDefinition\INDEX_FORMAT.
ilDBPdo::getLastErrorCode | ( | ) |
ilDBPdo::getLastInsertId | ( | ) |
Implements ilDBPdoInterface.
Definition at line 1376 of file class.ilDBPdo.php.
ilDBPdo::getPassword | ( | ) |
Definition at line 923 of file class.ilDBPdo.php.
References $password.
Referenced by connect().
ilDBPdo::getPort | ( | ) |
Definition at line 933 of file class.ilDBPdo.php.
References $port.
Referenced by generateDSN().
ilDBPdo::getPrimaryKeyIdentifier | ( | ) |
Implements ilDBInterface.
Definition at line 274 of file class.ilDBPdo.php.
Referenced by addPrimaryKey().
ilDBPdo::getSequenceName | ( | string | $table_name | ) |
Implements ilDBInterface.
Definition at line 702 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 1272 of file class.ilDBPdo.php.
ilDBPdo::getStorageEngine | ( | ) |
Implements ilDBInterface.
Definition at line 1242 of file class.ilDBPdo.php.
References $storage_engine.
ilDBPdo::getUsername | ( | ) |
Definition at line 913 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 1474 of file class.ilDBPdo.php.
ilDBPdo::in | ( | string | $field, |
array | $values, | ||
bool | $negate = false , |
||
string | $type = "" |
||
) |
Implements ilDBInterface.
Definition at line 770 of file class.ilDBPdo.php.
ilDBPdo::indexExistsByFields | ( | string | $table_name, |
array | $fields | ||
) |
Implements ilDBInterface.
Definition at line 137 of file class.ilDBPdo.php.
References $DIC, $ini, generateDSN(), setDbname(), setDBType(), setHost(), setPassword(), setPort(), and setUsername().
|
abstract |
|
protected |
Definition at line 83 of file class.ilDBPdo.php.
Referenced by connect().
ilDBPdo::insert | ( | string | $table_name, |
array | $values | ||
) |
Implements ilDBInterface.
Definition at line 441 of file class.ilDBPdo.php.
References quote(), quoteIdentifier(), and sanitizeMB4StringIfNotSupported().
ilDBPdo::isFulltextIndex | ( | string | $a_table, |
string | $a_name | ||
) |
Is index a fulltext index?
Implements ilDBInterface.
Definition at line 685 of file class.ilDBPdo.php.
References fetchAssoc(), and query().
|
static |
Implements ilDBInterface.
Definition at line 1190 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 1076 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 1099 of file class.ilDBPdo.php.
ilDBPdo::lockTables | ( | array | $tables | ) |
Implements ilDBInterface.
Definition at line 754 of file class.ilDBPdo.php.
ilDBPdo::lower | ( | string | $expression | ) |
ilDBPdo::manipulate | ( | string | $query | ) |
ilDatabaseException |
Implements ilDBInterface.
Definition at line 551 of file class.ilDBPdo.php.
References $DIC, Vendor\Package\$e, ILIAS\Repository\int(), null, and sanitizeMB4StringIfNotSupported().
Referenced by manipulateF().
ilDBPdo::manipulateF | ( | string | $query, |
array | $types, | ||
array | $values | ||
) |
string[] | $types |
ilDatabaseException |
Implements ilDBInterface.
Definition at line 797 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 1295 of file class.ilDBPdo.php.
ilDBPdo::migrateAllTablesToEngine | ( | string | $engine = ilDBConstants::MYSQL_ENGINE_INNODB | ) |
Implements ilDBPdoInterface.
Definition at line 1287 of file class.ilDBPdo.php.
ilDBPdo::modifyTableColumn | ( | string | $table, |
string | $column, | ||
array | $attributes | ||
) |
Implements ilDBInterface.
Definition at line 1107 of file class.ilDBPdo.php.
References Vendor\Package\$a, $attributes, $field_definition, and checkColumnDefinition().
|
abstract |
$table_name | string |
Implements ilDBInterface.
Referenced by quoteIdentifier().
ilDBPdo::now | ( | ) |
Implements ilDBInterface.
Definition at line 839 of file class.ilDBPdo.php.
Referenced by quote().
ilDBPdo::numRows | ( | ilDBStatement | $statement | ) |
Implements ilDBInterface.
Definition at line 583 of file class.ilDBPdo.php.
References ilDBStatement\rowCount().
Prepare a query (SELECT) statement to be used with execute.
Implements ilDBInterface.
Definition at line 993 of file class.ilDBPdo.php.
ilDBPdo::prepareManip | ( | string | $query, |
?array | $types = null |
||
) |
Implements ilDBInterface.
Definition at line 988 of file class.ilDBPdo.php.
Referenced by update().
ilDBPdo::primaryExistsByFields | ( | string | $table_name, |
array | $fields | ||
) |
Implements ilDBInterface.
Definition at line 1514 of file class.ilDBPdo.php.
References ILIAS\UI\examples\Symbol\Glyph\Sort\sort().
ilDBPdo::query | ( | string | $query | ) |
ilDatabaseException |
Implements ilDBInterface.
Definition at line 352 of file class.ilDBPdo.php.
References $DIC, Vendor\Package\$e, $info, $res, appendLimit(), ILIAS\Repository\int(), and null.
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 1247 of file class.ilDBPdo.php.
References 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 779 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 1258 of file class.ilDBPdo.php.
References ilDBConstants\FETCHMODE_ASSOC, and ilDBConstants\FETCHMODE_OBJECT.
ilDBPdo::quote | ( | $value, | |
?string | $type = null |
||
) |
Definition at line 588 of file class.ilDBPdo.php.
References ILIAS\Repository\int(), now(), null, 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 168 of file class.ilDBPdo.php.
References ILIAS\Repository\int(), and nextId().
Referenced by insert(), ilDBPdoMySQL\nextId(), replace(), and update().
ilDBPdo::renameTable | ( | string | $name, |
string | $new_name | ||
) |
Implements ilDBInterface.
Definition at line 1157 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 414 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 844 of file class.ilDBPdo.php.
References $q, ILIAS\Repository\int(), manipulateF(), and quoteIdentifier().
ilDBPdo::rollback | ( | ) |
Implements ilDBInterface.
Definition at line 1223 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 1447 of file class.ilDBPdo.php.
References doesCollationSupportMB4Strings(), and ilDBConstants\MB4_REPLACEMENT.
Referenced by insert(), manipulate(), and update().
ilDBPdo::sequenceExists | ( | string | $sequence | ) |
Implements ilDBInterface.
Definition at line 1071 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 958 of file class.ilDBPdo.php.
References setHost().
ilDBPdo::setDbname | ( | string | $dbname | ) |
Definition at line 898 of file class.ilDBPdo.php.
References $dbname.
Referenced by createDatabase(), and initFromIniFile().
ilDBPdo::setDBPassword | ( | string | $password | ) |
Implements ilDBInterface.
Definition at line 953 of file class.ilDBPdo.php.
References setPassword().
ilDBPdo::setDBPort | ( | int | $port | ) |
Implements ilDBInterface.
Definition at line 948 of file class.ilDBPdo.php.
References setPort().
ilDBPdo::setDBType | ( | string | $type | ) |
Definition at line 726 of file class.ilDBPdo.php.
References $DIC, $ilDB, ilDBInterface\getReservedWords(), and null.
Referenced by initFromIniFile().
ilDBPdo::setDBUser | ( | string | $user | ) |
Implements ilDBInterface.
Definition at line 943 of file class.ilDBPdo.php.
References setUsername().
ilDBPdo::setFieldDefinition | ( | \ilDBPdoFieldDefinition | $field_definition | ) |
ilDBPdo::setHost | ( | string | $host | ) |
Definition at line 888 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 822 of file class.ilDBPdo.php.
References $limit, and $offset.
ilDBPdo::setPassword | ( | string | $password | ) |
Definition at line 928 of file class.ilDBPdo.php.
References $password.
Referenced by initFromIniFile(), and setDBPassword().
ilDBPdo::setPort | ( | int | $port | ) |
Definition at line 938 of file class.ilDBPdo.php.
References $port.
Referenced by initFromIniFile(), and setDBPort().
ilDBPdo::setStorageEngine | ( | string | $storage_engine | ) |
Implements ilDBInterface.
Definition at line 1237 of file class.ilDBPdo.php.
References $storage_engine.
ilDBPdo::setUsername | ( | string | $username | ) |
Definition at line 918 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 979 of file class.ilDBPdo.php.
ilDBPdo::supports | ( | string | $feature | ) |
Implements ilDBInterface.
Definition at line 1033 of file class.ilDBPdo.php.
References supportsFulltext(), supportsSlave(), and supportsTransactions().
Referenced by beginTransaction(), commit(), and rollback().
ilDBPdo::supportsCollationMigration | ( | ) |
Implements ilDBPdoInterface.
Definition at line 1303 of file class.ilDBPdo.php.
ilDBPdo::supportsEngineMigration | ( | ) |
Implements ilDBPdoInterface.
Definition at line 1308 of file class.ilDBPdo.php.
ilDBPdo::supportsFulltext | ( | ) |
Implements ilDBInterface.
Definition at line 1023 of file class.ilDBPdo.php.
Referenced by addIndex(), and supports().
ilDBPdo::supportsSlave | ( | ) |
Implements ilDBInterface.
Definition at line 1018 of file class.ilDBPdo.php.
Referenced by supports().
ilDBPdo::supportsTransactions | ( | ) |
Implements ilDBInterface.
Definition at line 1028 of file class.ilDBPdo.php.
Referenced by supports().
ilDBPdo::tableColumnExists | ( | string | $table_name, |
string | $column_name | ||
) |
Implements ilDBInterface.
Definition at line 295 of file class.ilDBPdo.php.
References loadModule(), and ilDBConstants\MODULE_MANAGER.
ilDBPdo::tableExists | ( | string | $table_name | ) |
Implements ilDBInterface.
Definition at line 285 of file class.ilDBPdo.php.
ilDBPdo::uniqueConstraintExists | ( | string | $table, |
array | $fields | ||
) |
Implements ilDBPdoInterface.
Definition at line 1386 of file class.ilDBPdo.php.
References $c, and Vendor\Package\$f.
ilDBPdo::unixTimestamp | ( | ) |
Implements ilDBPdoInterface.
Definition at line 1425 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 470 of file class.ilDBPdo.php.
References $q, $r, ilDBInterface\execute(), free(), ILIAS\Repository\int(), manipulateF(), prepareManip(), quote(), quoteIdentifier(), and sanitizeMB4StringIfNotSupported().
ilDBPdo::upper | ( | string | $expression | ) |
ilDBPdo::useSlave | ( | bool | $bool | ) |
|
protected |
Definition at line 51 of file class.ilDBPdo.php.
Referenced by addTableColumn(), getAttributes(), and modifyTableColumn().
|
protected |
Definition at line 37 of file class.ilDBPdo.php.
Referenced by generateDSN(), getCharset(), and setCharset().
|
protected |
Definition at line 55 of file class.ilDBPdo.php.
Referenced by getDBType().
|
protected |
Definition at line 36 of file class.ilDBPdo.php.
Referenced by getDbname(), and setDbname().
|
protected |
Definition at line 47 of file class.ilDBPdo.php.
Referenced by getDSN().
|
protected |
Definition at line 56 of file class.ilDBPdo.php.
Referenced by getLastErrorCode().
|
protected |
Definition at line 57 of file class.ilDBPdo.php.
Referenced by getFieldDefinition(), modifyTableColumn(), and setFieldDefinition().
|
protected |
Definition at line 35 of file class.ilDBPdo.php.
|
protected |
Definition at line 44 of file class.ilDBPdo.php.
Referenced by appendLimit(), and setLimit().
|
protected |
Definition at line 42 of file class.ilDBPdo.php.
Referenced by addUniqueConstraint(), loadModule(), and ilDBPdoMySQL\migrateAllTablesToCollation().
|
protected |
Definition at line 45 of file class.ilDBPdo.php.
Referenced by setLimit().
array ilDBPdo::$options = [] |
Definition at line 31 of file class.ilDBPdo.php.
Referenced by getAttributes().
|
protected |
Definition at line 39 of file class.ilDBPdo.php.
Referenced by getPassword(), and setPassword().
|
protected |
Definition at line 41 of file class.ilDBPdo.php.
|
protected |
Definition at line 40 of file class.ilDBPdo.php.
|
protected |
Definition at line 43 of file class.ilDBPdo.php.
Referenced by loadModule().
|
protected |
Definition at line 46 of file class.ilDBPdo.php.
Referenced by getStorageEngine(), and setStorageEngine().
|
protected |
Definition at line 38 of file class.ilDBPdo.php.
Referenced by getUsername(), and setUsername().
const ilDBPdo::FEATURE_FULLTEXT = 'fulltext' |
Definition at line 33 of file class.ilDBPdo.php.
const ilDBPdo::FEATURE_SLAVE = 'slave' |
Definition at line 34 of file class.ilDBPdo.php.
const ilDBPdo::FEATURE_TRANSACTIONS = 'transactions' |
Definition at line 32 of file class.ilDBPdo.php.