ILIAS
release_7 Revision v7.30-3-g800a261c036
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | ||||||||||
connect ($return_false_for_error=false) | ||||||||||
initHelpers () | ||||||||||
getFieldDefinition () | ||||||||||
setFieldDefinition ($field_definition) | ||||||||||
createDatabase ($a_name, $a_charset="utf8", $a_collation="") | ||||||||||
getLastErrorCode () | ||||||||||
initFromIniFile ($tmpClientIniFile=null) | ||||||||||
generateDSN () | ||||||||||
quoteIdentifier ($identifier, $check_option=false) | ||||||||||
nextId ($table_name) | ||||||||||
createTable ($table_name, $fields, $drop_table=false, $ignore_erros=false) | ||||||||||
checkColumnName ($a_name) | ||||||||||
addPrimaryKey ($table_name, $primary_keys) | ||||||||||
dropIndexByFields ($table_name, $fields) | ||||||||||
getPrimaryKeyIdentifier () | ||||||||||
createSequence ($table_name, $start=1) | ||||||||||
tableExists ($table_name) | ||||||||||
tableColumnExists ($table_name, $column_name) | ||||||||||
addTableColumn ($table_name, $column_name, $attributes) | ||||||||||
dropTable ($table_name, $error_if_not_existing=true) | ||||||||||
query ($query) | ||||||||||
dropSequence ($table_name) | ||||||||||
dropTableColumn ($table_name, $column_name) | ||||||||||
renameTableColumn ($table_name, $column_old_name, $column_new_name) | ||||||||||
insert ($table_name, $values) | ||||||||||
fetchObject ($query_result) | ||||||||||
update ($table_name, $columns, $where) | ||||||||||
manipulate ($query) | ||||||||||
fetchAssoc ($query_result) | ||||||||||
numRows ($query_result) | ||||||||||
quote ($value, $type=null) | ||||||||||
indexExistsByFields ($table_name, $fields) | ||||||||||
addIndex ($table_name, $fields, $index_name='', $fulltext=false) | ||||||||||
addFulltextIndex ($a_table, $a_fields, $a_name="in") | ||||||||||
dropFulltextIndex ($a_table, $a_name) | ||||||||||
Drop fulltext index. More... | ||||||||||
isFulltextIndex ($a_table, $a_name) | ||||||||||
Is index a fulltext index? More... | ||||||||||
getIndexName ($index_name_base) | ||||||||||
getSequenceName ($table_name) | ||||||||||
constraintName ($a_table, $a_constraint) | ||||||||||
Determine contraint name by table name and constraint name. More... | ||||||||||
getDSN () | ||||||||||
getDBType () | ||||||||||
setDBType ($type) | ||||||||||
lockTables ($tables) | ||||||||||
unlockTables () | ||||||||||
in ($field, $values, $negate=false, $type="") | ||||||||||
queryF ($query, $types, $values) | ||||||||||
manipulateF ($query, $types, $values) | ||||||||||
useSlave ($bool) | ||||||||||
setLimit ($limit, $offset=0) | ||||||||||
Set the Limit for the next Query. More... | ||||||||||
like ($column, $type, $value="?", $case_insensitive=true) | ||||||||||
now () | ||||||||||
replace ($table, $primaryKeys, $otherColumns) | ||||||||||
Replace into method. More... | ||||||||||
equals ($columns, $value, $type, $emptyOrNull=false) | ||||||||||
getHost () | ||||||||||
setHost ($host) | ||||||||||
getDbname () | ||||||||||
setDbname ($dbname) | ||||||||||
getCharset () | ||||||||||
setCharset ($charset) | ||||||||||
getUsername () | ||||||||||
setUsername ($username) | ||||||||||
getPassword () | ||||||||||
setPassword ($password) | ||||||||||
getPort () | ||||||||||
setPort ($port) | ||||||||||
setDBUser ($user) | ||||||||||
setDBPort ($port) | ||||||||||
setDBPassword ($password) | ||||||||||
setDBHost ($host) | ||||||||||
upper ($a_exp) | ||||||||||
lower ($a_exp) | ||||||||||
substr ($a_exp, $a_pos=1, $a_len=-1) | ||||||||||
prepareManip ($query, $types=null) | ||||||||||
prepare ($query, $types=null, $result_types=null) | ||||||||||
enableResultBuffering ($a_status) | ||||||||||
supportsSlave () | ||||||||||
supportsFulltext () | ||||||||||
supportsTransactions () | ||||||||||
supports ($feature) | ||||||||||
listTables () | ||||||||||
loadModule ($module) | ||||||||||
getAllowedAttributes () | ||||||||||
| ||||||||||
sequenceExists ($sequence) | ||||||||||
listSequences () | ||||||||||
concat (array $values, $allow_null=true) | ||||||||||
locate ($a_needle, $a_string, $a_start_pos=1) | ||||||||||
modifyTableColumn ($table, $a_column, $a_attributes) | ||||||||||
renameTable ($a_name, $a_new_name) | ||||||||||
checkTableName ($a_name) | ||||||||||
beginTransaction () | ||||||||||
commit () | ||||||||||
rollback () | ||||||||||
dropIndex ($a_table, $a_name="i1") | ||||||||||
setStorageEngine ($storage_engine) | ||||||||||
getStorageEngine () | ||||||||||
queryCol ($query, $type=PDO::FETCH_ASSOC, $colnum=0) | ||||||||||
queryRow ($query, $types=null, $fetchmode=ilDBConstants::FETCHMODE_DEFAULT) | ||||||||||
getServerVersion ($native=false) | ||||||||||
escape ($value, $escape_wildcards=false) | ||||||||||
escapePattern ($text) | ||||||||||
migrateAllTablesToEngine ($engine=ilDBConstants::MYSQL_ENGINE_INNODB) | ||||||||||
migrateAllTablesToCollation ($collation=ilDBConstants::MYSQL_COLLATION_UTF8MB4) | ||||||||||
supportsCollationMigration () | ||||||||||
supportsEngineMigration () | ||||||||||
checkIndexName ($name) | ||||||||||
addUniqueConstraint ($table, $fields, $name="con") | ||||||||||
dropUniqueConstraint ($a_table, $a_name="con") | ||||||||||
dropUniqueConstraintByFields ($a_table, $a_fields) | ||||||||||
getLastInsertId () | ||||||||||
buildAtomQuery () | ||||||||||
uniqueConstraintExists ($table, array $fields) | ||||||||||
dropPrimaryKey ($table_name) | ||||||||||
executeMultiple ($stmt, $a_data) | ||||||||||
fromUnixtime ($a_expr, $a_to_text=true) | ||||||||||
unixTimestamp () | ||||||||||
autoExecute ($tablename, $fields, $mode=ilDBConstants::AUTOQUERY_INSERT, $where=false) | ||||||||||
Generate an insert, update or delete query and call prepare() and execute() on it. More... | ||||||||||
getDBVersion () | ||||||||||
sanitizeMB4StringIfNotSupported ($query) | ||||||||||
| ||||||||||
doesCollationSupportMB4Strings () | ||||||||||
groupConcat ($a_field_name, $a_seperator=",", $a_order=null) | ||||||||||
| ||||||||||
cast ($a_field_name, $a_dest_type) | ||||||||||
| ||||||||||
primaryExistsByFields (string $table_name, array $fields) | ||||||||||
| ||||||||||
![]() | ||||||||||
fetchAll ($query_result, $fetch_mode=ilDBConstants::FETCHMODE_ASSOC) | ||||||||||
substr ($a_exp) | ||||||||||
execute ($stmt, $data=array()) | ||||||||||
free ($a_st) | ||||||||||
Static Public Member Functions | |
static | isReservedWord ($a_word) |
![]() | |
static | getReservedWords () |
Get reserved words. More... | |
Data Fields | |
const | FEATURE_TRANSACTIONS = 'transactions' |
const | FEATURE_FULLTEXT = 'fulltext' |
const | FEATURE_SLAVE = 'slave' |
Protected Member Functions | |
initSQLMode () | |
getAttributes () | |
getAdditionalAttributes () | |
checkTableColumns ($a_cols) | |
checkColumn ($a_col, $a_def) | |
checkColumnDefinition ($a_def, $a_modify_mode=false) | |
appendLimit ($query) | |
autoPrepare ($table, $table_fields, $mode=ilDBConstants::AUTOQUERY_INSERT, $where=false, $types=null, $result_types=ilDBConstants::PREPARE_MANIP) | |
buildManipSQL ($table, $table_fields, $mode, $where=false) | |
Protected Attributes | |
$host = '' | |
$dbname = '' | |
$charset = 'utf8' | |
$username = '' | |
$password = '' | |
$port = 3306 | |
$pdo | |
$manager | |
$reverse | |
$limit = null | |
$offset = null | |
$storage_engine = 'MyISAM' | |
$dsn = '' | |
$attributes | |
$db_type = '' | |
$error_code = 0 | |
$field_definition | |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class pdoDB
Definition at line 24 of file class.ilDBPdo.php.
ilDBPdo::addFulltextIndex | ( | $a_table, | |
$a_fields, | |||
$a_name = "in" |
|||
) |
$a_table | ||
$a_fields | ||
string | $a_name |
Implements ilDBInterface.
Definition at line 900 of file class.ilDBPdo.php.
References constraintName(), and query().
Referenced by addIndex().
ilDBPdo::addIndex | ( | $table_name, | |
$fields, | |||
$index_name = '' , |
|||
$fulltext = false |
|||
) |
$table_name | ||
array | $fields | |
$index_name |
Implements ilDBInterface.
Definition at line 868 of file class.ilDBPdo.php.
References Vendor\Package\$f, addFulltextIndex(), constraintName(), and supportsFulltext().
ilDBPdo::addPrimaryKey | ( | $table_name, | |
$primary_keys | |||
) |
string | $table_name | |
array | $primary_keys |
Implements ilDBInterface.
Definition at line 356 of file class.ilDBPdo.php.
References Vendor\Package\$f, constraintName(), and getPrimaryKeyIdentifier().
ilDBPdo::addTableColumn | ( | $table_name, | |
$column_name, | |||
$attributes | |||
) |
string | $table_name | |
string | $column_name | |
array | $attributes |
Implements ilDBInterface.
Definition at line 453 of file class.ilDBPdo.php.
References $attributes, checkColumnDefinition(), and checkColumnName().
ilDBPdo::addUniqueConstraint | ( | $table, | |
$fields, | |||
$name = "con" |
|||
) |
$table | ||
$fields | ||
string | $name |
Implements ilDBPdoInterface.
Definition at line 1891 of file class.ilDBPdo.php.
References Vendor\Package\$f, $manager, $name, checkIndexName(), and constraintName().
|
protected |
$query |
Definition at line 1545 of file class.ilDBPdo.php.
References $limit, and $query.
Referenced by query().
ilDBPdo::autoExecute | ( | $tablename, | |
$fields, | |||
$mode = ilDBConstants::AUTOQUERY_INSERT , |
|||
$where = false |
|||
) |
Generate an insert, update or delete query and call prepare() and execute() on it.
string | $tablename | of the table |
array | $fields | ($key=>$value) where $key is a field name and $value its value |
int | $mode | of query to build ilDBConstants::AUTOQUERY_INSERT ilDBConstants::AUTOQUERY_UPDATE ilDBConstants::AUTOQUERY_DELETE ilDBConstants::AUTOQUERY_SELECT |
bool | $where | (in case of update and delete queries, this string will be put after the sql WHERE statement) |
Implements ilDBPdoInterface.
Definition at line 2054 of file class.ilDBPdo.php.
References $keys, $query, $result, autoPrepare(), ilDBConstants\AUTOQUERY_INSERT, buildManipSQL(), ilDBInterface\execute(), and ilDBInterface\free().
|
protected |
$table | ||
$table_fields | ||
int | $mode | |
bool | $where | |
null | $types | |
bool | $result_types |
Definition at line 2090 of file class.ilDBPdo.php.
References $query, buildManipSQL(), and prepare().
Referenced by autoExecute().
ilDBPdo::beginTransaction | ( | ) |
Implements ilDBInterface.
Definition at line 1690 of file class.ilDBPdo.php.
References supports().
Referenced by ilDBPdoPostgreSQL\lockTables().
ilDBPdo::buildAtomQuery | ( | ) |
|
protected |
$table | ||
$table_fields | ||
$mode | ||
bool | $where |
Definition at line 2106 of file class.ilDBPdo.php.
References $cols, ilDBConstants\AUTOQUERY_DELETE, ilDBConstants\AUTOQUERY_INSERT, ilDBConstants\AUTOQUERY_SELECT, ilDBConstants\AUTOQUERY_UPDATE, and quoteIdentifier().
Referenced by autoExecute(), and autoPrepare().
ilDBPdo::cast | ( | $a_field_name, | |
$a_dest_type | |||
) |
string | $a_field_name | |
string | $a_dest_type |
Implements ilDBInterface.
Definition at line 2212 of file class.ilDBPdo.php.
|
protected |
$a_col | |
$a_def |
Definition at line 315 of file class.ilDBPdo.php.
References checkColumnDefinition(), and checkColumnName().
Referenced by checkTableColumns().
|
protected |
$a_def | ||
bool | $a_modify_mode |
Definition at line 334 of file class.ilDBPdo.php.
Referenced by addTableColumn(), checkColumn(), and modifyTableColumn().
ilDBPdo::checkColumnName | ( | $a_name | ) |
$a_name |
Definition at line 344 of file class.ilDBPdo.php.
Referenced by addTableColumn(), checkColumn(), and renameTableColumn().
ilDBPdo::checkIndexName | ( | $name | ) |
$name |
Implements ilDBPdoInterface.
Definition at line 1878 of file class.ilDBPdo.php.
References $name, and getFieldDefinition().
Referenced by addUniqueConstraint().
|
protected |
$a_cols |
Definition at line 298 of file class.ilDBPdo.php.
References checkColumn().
Referenced by createTable().
ilDBPdo::checkTableName | ( | $a_name | ) |
$a_name |
Implements ilDBInterface.
Definition at line 1667 of file class.ilDBPdo.php.
Referenced by createTable(), ilDBPdoPostgreSQL\renameTable(), and renameTable().
ilDBPdo::commit | ( | ) |
Implements ilDBInterface.
Definition at line 1704 of file class.ilDBPdo.php.
References supports().
Referenced by ilDBPdoPostgreSQL\unlockTables().
ilDBPdo::concat | ( | array | $values, |
$allow_null = true |
|||
) |
array | $values | |
bool | $allow_null |
Implements ilDBInterface.
Definition at line 1535 of file class.ilDBPdo.php.
ilDBPdo::connect | ( | $return_false_for_error = false | ) |
bool | $return_false_for_error |
Implements ilDBInterface.
Definition at line 107 of file class.ilDBPdo.php.
References Vendor\Package\$e, generateDSN(), getAttributes(), getDSN(), getPassword(), getUsername(), initHelpers(), and initSQLMode().
Referenced by createDatabase().
ilDBPdo::constraintName | ( | $a_table, | |
$a_constraint | |||
) |
Determine contraint name by table name and constraint name.
In MySQL these are "unique" per table
Implements ilDBInterface.
Definition at line 959 of file class.ilDBPdo.php.
Referenced by addFulltextIndex(), addIndex(), addPrimaryKey(), addUniqueConstraint(), dropFulltextIndex(), and dropUniqueConstraint().
ilDBPdo::createDatabase | ( | $a_name, | |
$a_charset = "utf8" , |
|||
$a_collation = "" |
|||
) |
$a_name | ||
string | $a_charset | |
string | $a_collation |
Implements ilDBInterface.
Definition at line 183 of file class.ilDBPdo.php.
References Vendor\Package\$e, connect(), generateDSN(), query(), and setDbname().
ilDBPdo::createSequence | ( | $table_name, | |
$start = 1 |
|||
) |
$table_name | ||
int | $start |
Implements ilDBInterface.
Definition at line 408 of file class.ilDBPdo.php.
ilDBPdo::createTable | ( | $table_name, | |
$fields, | |||
$drop_table = false , |
|||
$ignore_erros = false |
|||
) |
$table_name | ||
$fields | ||
bool | $drop_table | |
bool | $ignore_erros |
Implements ilDBInterface.
Definition at line 274 of file class.ilDBPdo.php.
References checkTableColumns(), checkTableName(), and dropTable().
ilDBPdo::doesCollationSupportMB4Strings | ( | ) |
Implements ilDBInterface.
Definition at line 2195 of file class.ilDBPdo.php.
Referenced by sanitizeMB4StringIfNotSupported().
ilDBPdo::dropFulltextIndex | ( | $a_table, | |
$a_name | |||
) |
Drop fulltext index.
Implements ilDBInterface.
Definition at line 912 of file class.ilDBPdo.php.
References constraintName(), and query().
ilDBPdo::dropIndex | ( | $a_table, | |
$a_name = "i1" |
|||
) |
$a_table | ||
string | $a_name |
Implements ilDBInterface.
Definition at line 1733 of file class.ilDBPdo.php.
Referenced by dropIndexByFields().
ilDBPdo::dropIndexByFields | ( | $table_name, | |
$fields | |||
) |
$table_name | |
$fields |
Implements ilDBInterface.
Definition at line 380 of file class.ilDBPdo.php.
References dropIndex().
ilDBPdo::dropPrimaryKey | ( | $table_name | ) |
$table_name |
Implements ilDBPdoInterface.
Definition at line 2001 of file class.ilDBPdo.php.
ilDBPdo::dropSequence | ( | $table_name | ) |
$table_name | string |
Implements ilDBInterface.
Definition at line 560 of file class.ilDBPdo.php.
ilDBPdo::dropTable | ( | $table_name, | |
$error_if_not_existing = true |
|||
) |
$table_name | ||
bool | $error_if_not_existing |
Implements ilDBInterface.
Definition at line 478 of file class.ilDBPdo.php.
References loadModule(), and ilDBConstants\MODULE_MANAGER.
Referenced by createTable().
ilDBPdo::dropTableColumn | ( | $table_name, | |
$column_name | |||
) |
string | $table_name | |
string | $column_name |
Implements ilDBInterface.
Definition at line 572 of file class.ilDBPdo.php.
ilDBPdo::dropUniqueConstraint | ( | $a_table, | |
$a_name = "con" |
|||
) |
$a_table | ||
string | $a_name |
Implements ilDBPdoInterface.
Definition at line 1919 of file class.ilDBPdo.php.
References constraintName().
Referenced by dropUniqueConstraintByFields().
ilDBPdo::dropUniqueConstraintByFields | ( | $a_table, | |
$a_fields | |||
) |
$a_table | |
$a_fields |
Implements ilDBPdoInterface.
Definition at line 1930 of file class.ilDBPdo.php.
References $c, Vendor\Package\$f, and dropUniqueConstraint().
ilDBPdo::enableResultBuffering | ( | $a_status | ) |
$a_status |
Implements ilDBInterface.
Definition at line 1407 of file class.ilDBPdo.php.
References $data, $result, and ilDBInterface\execute().
ilDBPdo::equals | ( | $columns, | |
$value, | |||
$type, | |||
$emptyOrNull = false |
|||
) |
$columns | ||
$value | ||
$type | ||
bool | $emptyOrNull |
Implements ilDBInterface.
Definition at line 1190 of file class.ilDBPdo.php.
References $columns, $type, and quote().
ilDBPdo::escape | ( | $value, | |
$escape_wildcards = false |
|||
) |
$value | ||
bool | $escape_wildcards |
Implements ilDBPdoInterface.
Definition at line 1820 of file class.ilDBPdo.php.
ilDBPdo::escapePattern | ( | $text | ) |
$text |
Implements ilDBPdoInterface.
Definition at line 1830 of file class.ilDBPdo.php.
ilDBPdo::executeMultiple | ( | $stmt, | |
$a_data | |||
) |
$stmt | |
$a_data |
Implements ilDBPdoInterface.
Definition at line 2011 of file class.ilDBPdo.php.
References $i.
ilDBPdo::fetchAssoc | ( | $query_result | ) |
$query_result | ilPDOStatement |
Implements ilDBInterface.
Definition at line 775 of file class.ilDBPdo.php.
References $res.
Referenced by isFulltextIndex().
ilDBPdo::fetchObject | ( | $query_result | ) |
$query_result | ilPDOStatement |
Implements ilDBInterface.
Definition at line 647 of file class.ilDBPdo.php.
References $res.
Referenced by getDBVersion().
ilDBPdo::fromUnixtime | ( | $a_expr, | |
$a_to_text = true |
|||
) |
$a_expr | ||
bool | $a_to_text |
Implements ilDBPdoInterface.
Definition at line 2024 of file class.ilDBPdo.php.
ilDBPdo::generateDSN | ( | ) |
Definition at line 238 of file class.ilDBPdo.php.
References $charset, $dbname, $host, $port, getCharset(), getDbname(), getHost(), and getPort().
Referenced by connect(), createDatabase(), and initFromIniFile().
|
protected |
Definition at line 152 of file class.ilDBPdo.php.
Referenced by getAttributes().
ilDBPdo::getAllowedAttributes | ( | ) |
|
protected |
Definition at line 138 of file class.ilDBPdo.php.
References $attributes, and getAdditionalAttributes().
Referenced by ilDBPdoPostgreSQL\connect(), and connect().
ilDBPdo::getCharset | ( | ) |
Definition at line 1239 of file class.ilDBPdo.php.
References $charset.
Referenced by generateDSN().
ilDBPdo::getDbname | ( | ) |
Definition at line 1221 of file class.ilDBPdo.php.
References $dbname.
Referenced by ilDBPdoPostgreSQL\generateDSN(), and generateDSN().
ilDBPdo::getDBType | ( | ) |
Implements ilDBInterface.
Definition at line 977 of file class.ilDBPdo.php.
References $db_type.
ilDBPdo::getDBVersion | ( | ) |
ilDatabaseException |
Implements ilDBPdoInterface.
Definition at line 2165 of file class.ilDBPdo.php.
References $d, fetchObject(), and query().
ilDBPdo::getDSN | ( | ) |
Implements ilDBInterface.
Definition at line 968 of file class.ilDBPdo.php.
References $dsn.
Referenced by ilDBPdoPostgreSQL\connect(), and connect().
ilDBPdo::getFieldDefinition | ( | ) |
Definition at line 161 of file class.ilDBPdo.php.
References $field_definition.
Referenced by checkIndexName().
ilDBPdo::getHost | ( | ) |
Definition at line 1203 of file class.ilDBPdo.php.
References $host.
Referenced by ilDBPdoPostgreSQL\generateDSN(), and generateDSN().
ilDBPdo::getIndexName | ( | $index_name_base | ) |
$index_name_base |
Definition at line 939 of file class.ilDBPdo.php.
References ilDBPdoFieldDefinition\INDEX_FORMAT.
ilDBPdo::getLastErrorCode | ( | ) |
ilDBPdo::getLastInsertId | ( | ) |
ilDBPdo::getPassword | ( | ) |
Definition at line 1275 of file class.ilDBPdo.php.
References $password.
Referenced by ilDBPdoPostgreSQL\connect(), connect(), and ilDBPdoPostgreSQL\generateDSN().
ilDBPdo::getPort | ( | ) |
Definition at line 1293 of file class.ilDBPdo.php.
References $port.
Referenced by ilDBPdoPostgreSQL\generateDSN(), and generateDSN().
ilDBPdo::getPrimaryKeyIdentifier | ( | ) |
Implements ilDBInterface.
Definition at line 398 of file class.ilDBPdo.php.
Referenced by addPrimaryKey().
ilDBPdo::getSequenceName | ( | $table_name | ) |
$table_name |
Implements ilDBInterface.
Definition at line 949 of file class.ilDBPdo.php.
References ilDBPdoFieldDefinition\SEQUENCE_FORMAT.
Referenced by ilDBPdoMySQL\nextId(), ilDBPdoPostgreSQL\renameTable(), and renameTable().
ilDBPdo::getServerVersion | ( | $native = false | ) |
bool | $native |
Implements ilDBPdoInterface.
Definition at line 1809 of file class.ilDBPdo.php.
ilDBPdo::getStorageEngine | ( | ) |
Implements ilDBInterface.
Definition at line 1751 of file class.ilDBPdo.php.
References $storage_engine.
ilDBPdo::getUsername | ( | ) |
Definition at line 1257 of file class.ilDBPdo.php.
References $username.
Referenced by ilDBPdoPostgreSQL\connect(), connect(), and ilDBPdoPostgreSQL\generateDSN().
ilDBPdo::groupConcat | ( | $a_field_name, | |
$a_seperator = "," , |
|||
$a_order = null |
|||
) |
string | $a_field_name | |
string | $a_seperator | |
string | $a_order |
Implements ilDBInterface.
Definition at line 2204 of file class.ilDBPdo.php.
ilDBPdo::in | ( | $field, | |
$values, | |||
$negate = false , |
|||
$type = "" |
|||
) |
$field | string | |
$values | array | |
bool | $negate | |
string | $type |
Implements ilDBInterface.
Definition at line 1045 of file class.ilDBPdo.php.
References $type.
ilDBPdo::indexExistsByFields | ( | $table_name, | |
$fields | |||
) |
string | $table_name | |
array | $fields |
Implements ilDBInterface.
Definition at line 847 of file class.ilDBPdo.php.
ilDBPdo::initFromIniFile | ( | $tmpClientIniFile = null | ) |
null | $tmpClientIniFile |
Implements ilDBInterface.
Definition at line 212 of file class.ilDBPdo.php.
References $DIC, generateDSN(), setDbname(), setDBType(), setHost(), setPassword(), setPort(), and setUsername().
|
abstract |
|
protected |
Definition at line 130 of file class.ilDBPdo.php.
Referenced by connect().
ilDBPdo::insert | ( | $table_name, | |
$values | |||
) |
$table_name | string |
$values |
Implements ilDBInterface.
Definition at line 624 of file class.ilDBPdo.php.
References $query, quote(), quoteIdentifier(), and sanitizeMB4StringIfNotSupported().
Referenced by ilDBPdoPostgreSQL\replace().
ilDBPdo::isFulltextIndex | ( | $a_table, | |
$a_name | |||
) |
Is index a fulltext index?
Implements ilDBInterface.
Definition at line 922 of file class.ilDBPdo.php.
References fetchAssoc(), and query().
|
static |
$a_word |
Implements ilDBInterface.
Definition at line 1677 of file class.ilDBPdo.php.
References $DIC, and ilDBPdoFieldDefinition\isReserved().
ilDBPdo::like | ( | $column, | |
$type, | |||
$value = "?" , |
|||
$case_insensitive = true |
|||
) |
string | $column | |
string | $type | |
string | $value | |
bool | $case_insensitive |
Implements ilDBInterface.
Definition at line 1128 of file class.ilDBPdo.php.
References $type.
ilDBPdo::listSequences | ( | ) |
Implements ilDBInterface.
Definition at line 1524 of file class.ilDBPdo.php.
Referenced by sequenceExists().
ilDBPdo::listTables | ( | ) |
Implements ilDBInterface.
Definition at line 1481 of file class.ilDBPdo.php.
Referenced by ilDBPdoMySQL\migrateAllTablesToEngine(), and ilDBPdoPostgreSQL\tableExists().
ilDBPdo::loadModule | ( | $module | ) |
$module |
Implements ilDBInterface.
Definition at line 1491 of file class.ilDBPdo.php.
References $manager, $reverse, ilDBConstants\MODULE_MANAGER, and ilDBConstants\MODULE_REVERSE.
Referenced by dropTable(), ilDBPdoMySQL\migrateAllTablesToCollation(), and tableColumnExists().
ilDBPdo::locate | ( | $a_needle, | |
$a_string, | |||
$a_start_pos = 1 |
|||
) |
$a_needle | ||
$a_string | ||
int | $a_start_pos |
Implements ilDBInterface.
Definition at line 1565 of file class.ilDBPdo.php.
ilDBPdo::lockTables | ( | $tables | ) |
array | $tables |
Implements ilDBInterface.
Definition at line 1013 of file class.ilDBPdo.php.
References $DIC.
ilDBPdo::lower | ( | $a_exp | ) |
$a_exp |
Implements ilDBInterface.
Definition at line 1358 of file class.ilDBPdo.php.
ilDBPdo::manipulate | ( | $query | ) |
string | $query |
Implements ilDBInterface.
Definition at line 749 of file class.ilDBPdo.php.
References $DIC, Vendor\Package\$e, $ilBench, $query, and sanitizeMB4StringIfNotSupported().
Referenced by manipulateF(), and ilDBPdoPostgreSQL\replace().
ilDBPdo::manipulateF | ( | $query, | |
$types, | |||
$values | |||
) |
$query | string |
$types | string[] |
$values | mixed[] |
ilDatabaseException |
Implements ilDBInterface.
Definition at line 1080 of file class.ilDBPdo.php.
References $query, manipulate(), and quote().
Referenced by replace(), and update().
ilDBPdo::migrateAllTablesToCollation | ( | $collation = ilDBConstants::MYSQL_COLLATION_UTF8MB4 | ) |
Implements ilDBPdoInterface.
Definition at line 1849 of file class.ilDBPdo.php.
ilDBPdo::migrateAllTablesToEngine | ( | $engine = ilDBConstants::MYSQL_ENGINE_INNODB | ) |
string | $engine |
Implements ilDBPdoInterface.
Definition at line 1840 of file class.ilDBPdo.php.
ilDBPdo::modifyTableColumn | ( | $table, | |
$a_column, | |||
$a_attributes | |||
) |
$table | |
$a_column | |
$a_attributes |
Implements ilDBInterface.
Definition at line 1578 of file class.ilDBPdo.php.
References Vendor\Package\$a, $field_definition, $type, checkColumnDefinition(), and ilDBInterface\free().
|
abstract |
$table_name | string |
Implements ilDBInterface.
Referenced by quoteIdentifier().
ilDBPdo::now | ( | ) |
Implements ilDBInterface.
Definition at line 1137 of file class.ilDBPdo.php.
Referenced by quote().
ilDBPdo::numRows | ( | $query_result | ) |
$query_result | PDOStatement |
Implements ilDBInterface.
Definition at line 793 of file class.ilDBPdo.php.
ilDBPdo::prepare | ( | $query, | |
$types = null , |
|||
$result_types = null |
|||
) |
$query | ||
null | $types | |
null | $result_types |
Implements ilDBInterface.
Definition at line 1398 of file class.ilDBPdo.php.
References $query.
Referenced by autoPrepare().
ilDBPdo::prepareManip | ( | $query, | |
$types = null |
|||
) |
$query | ||
null | $types |
Implements ilDBInterface.
Definition at line 1386 of file class.ilDBPdo.php.
References $query.
Referenced by update().
ilDBPdo::primaryExistsByFields | ( | string | $table_name, |
array | $fields | ||
) |
string | $table_name | |
array | $fields |
Implements ilDBInterface.
Definition at line 2220 of file class.ilDBPdo.php.
ilDBPdo::query | ( | $query | ) |
$query | string |
ilDatabaseException |
Implements ilDBInterface.
Definition at line 508 of file class.ilDBPdo.php.
References $data, $DIC, Vendor\Package\$e, $ilBench, $query, $res, appendLimit(), ilDBInterface\fetchAll(), and ilDBConstants\FETCHMODE_ASSOC.
Referenced by addFulltextIndex(), createDatabase(), dropFulltextIndex(), getDBVersion(), isFulltextIndex(), ilDBPdoPostgreSQL\lockTables(), ilDBPdoMySQL\nextId(), ilDBPdoPostgreSQL\nextId(), and queryF().
ilDBPdo::queryCol | ( | $query, | |
$type = PDO::FETCH_ASSOC , |
|||
$colnum = 0 |
|||
) |
$query | ||
int | $type | |
int | $colnum |
Implements ilDBPdoInterface.
Definition at line 1763 of file class.ilDBPdo.php.
References $query, $type, ilDBConstants\FETCHMODE_ASSOC, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilDBPdoMySQL\migrateAllTablesToEngine().
ilDBPdo::queryF | ( | $query, | |
$types, | |||
$values | |||
) |
string | $query | |
Implements ilDBInterface.
Definition at line 1058 of file class.ilDBPdo.php.
References $query, query(), and quote().
ilDBPdo::queryRow | ( | $query, | |
$types = null , |
|||
$fetchmode = ilDBConstants::FETCHMODE_DEFAULT |
|||
) |
$query | ||
null | $types | |
int | $fetchmode |
Implements ilDBPdoInterface.
Definition at line 1787 of file class.ilDBPdo.php.
References $query, $type, ilDBConstants\FETCHMODE_ASSOC, and ilDBConstants\FETCHMODE_OBJECT.
ilDBPdo::quote | ( | $value, | |
$type = null |
|||
) |
$value | |
$type |
Implements ilDBInterface.
Definition at line 805 of file class.ilDBPdo.php.
References $type, 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(), ilDBPdoPostgreSQL\replace(), and update().
ilDBPdo::quoteIdentifier | ( | $identifier, | |
$check_option = false |
|||
) |
$identifier |
Implements ilDBInterface.
Definition at line 252 of file class.ilDBPdo.php.
References nextId().
Referenced by buildManipSQL(), insert(), ilDBPdoMySQL\nextId(), replace(), and update().
ilDBPdo::renameTable | ( | $a_name, | |
$a_new_name | |||
) |
$a_name | |
$a_new_name |
Implements ilDBInterface.
Definition at line 1640 of file class.ilDBPdo.php.
References Vendor\Package\$e, checkTableName(), getSequenceName(), and sequenceExists().
ilDBPdo::renameTableColumn | ( | $table_name, | |
$column_old_name, | |||
$column_new_name | |||
) |
string | $table_name | |
string | $column_old_name | |
string | $column_new_name |
Implements ilDBInterface.
Definition at line 591 of file class.ilDBPdo.php.
References Vendor\Package\$f, and checkColumnName().
ilDBPdo::replace | ( | $table, | |
$primaryKeys, | |||
$otherColumns | |||
) |
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 1151 of file class.ilDBPdo.php.
References manipulateF(), and quoteIdentifier().
ilDBPdo::rollback | ( | ) |
Implements ilDBInterface.
Definition at line 1718 of file class.ilDBPdo.php.
References supports().
ilDBPdo::sanitizeMB4StringIfNotSupported | ( | $query | ) |
$query | string to sanitize, all MB4-Characters like emojis will re replaced with ??? |
Implements ilDBInterface.
Definition at line 2176 of file class.ilDBPdo.php.
References $query, doesCollationSupportMB4Strings(), and ilDBConstants\MB4_REPLACEMENT.
Referenced by insert(), manipulate(), and update().
ilDBPdo::sequenceExists | ( | $sequence | ) |
$sequence |
Implements ilDBInterface.
Definition at line 1515 of file class.ilDBPdo.php.
References listSequences().
Referenced by ilDBPdoPostgreSQL\renameTable(), and renameTable().
ilDBPdo::setCharset | ( | $charset | ) |
ilDBPdo::setDBHost | ( | $host | ) |
$host |
Implements ilDBInterface.
Definition at line 1338 of file class.ilDBPdo.php.
References $host, and setHost().
ilDBPdo::setDbname | ( | $dbname | ) |
string | $dbname |
Definition at line 1230 of file class.ilDBPdo.php.
References $dbname.
Referenced by createDatabase(), and initFromIniFile().
ilDBPdo::setDBPassword | ( | $password | ) |
$password |
Implements ilDBInterface.
Definition at line 1329 of file class.ilDBPdo.php.
References $password, and setPassword().
ilDBPdo::setDBPort | ( | $port | ) |
$port |
Implements ilDBInterface.
Definition at line 1320 of file class.ilDBPdo.php.
References $port, and setPort().
ilDBPdo::setDBType | ( | $type | ) |
string | $type |
Definition at line 987 of file class.ilDBPdo.php.
References $DIC, $ilDB, $type, and ilDBInterface\getReservedWords().
Referenced by initFromIniFile().
ilDBPdo::setDBUser | ( | $user | ) |
$user |
Implements ilDBInterface.
Definition at line 1311 of file class.ilDBPdo.php.
References setUsername().
ilDBPdo::setFieldDefinition | ( | $field_definition | ) |
ilDBPdoFieldDefinition | $field_definition |
Definition at line 170 of file class.ilDBPdo.php.
References $field_definition.
ilDBPdo::setHost | ( | $host | ) |
string | $host |
Definition at line 1212 of file class.ilDBPdo.php.
References $host.
Referenced by initFromIniFile(), and setDBHost().
ilDBPdo::setLimit | ( | $limit, | |
$offset = 0 |
|||
) |
Set the Limit for the next Query.
$limit | |
$offset |
Implements ilDBInterface.
Definition at line 1113 of file class.ilDBPdo.php.
References $limit, and $offset.
ilDBPdo::setPassword | ( | $password | ) |
string | $password |
Definition at line 1284 of file class.ilDBPdo.php.
References $password.
Referenced by initFromIniFile(), and setDBPassword().
ilDBPdo::setPort | ( | $port | ) |
int | $port |
Definition at line 1302 of file class.ilDBPdo.php.
References $port.
Referenced by ilDBPdoPostgreSQL\generateDSN(), initFromIniFile(), and setDBPort().
ilDBPdo::setStorageEngine | ( | $storage_engine | ) |
$storage_engine |
Implements ilDBInterface.
Definition at line 1742 of file class.ilDBPdo.php.
References $storage_engine.
ilDBPdo::setUsername | ( | $username | ) |
string | $username |
Definition at line 1266 of file class.ilDBPdo.php.
References $username.
Referenced by initFromIniFile(), and setDBUser().
ilDBPdo::substr | ( | $a_exp, | |
$a_pos = 1 , |
|||
$a_len = -1 |
|||
) |
$a_exp | ||
int | $a_pos | |
int | $a_len |
Definition at line 1370 of file class.ilDBPdo.php.
ilDBPdo::supports | ( | $feature | ) |
$feature |
Implements ilDBInterface.
Definition at line 1463 of file class.ilDBPdo.php.
References supportsFulltext(), supportsSlave(), and supportsTransactions().
Referenced by beginTransaction(), commit(), and rollback().
ilDBPdo::supportsCollationMigration | ( | ) |
Implements ilDBPdoInterface.
Definition at line 1858 of file class.ilDBPdo.php.
ilDBPdo::supportsEngineMigration | ( | ) |
ilDBPdo::supportsFulltext | ( | ) |
Implements ilDBInterface.
Definition at line 1444 of file class.ilDBPdo.php.
Referenced by addIndex(), and supports().
ilDBPdo::supportsSlave | ( | ) |
Implements ilDBInterface.
Definition at line 1435 of file class.ilDBPdo.php.
Referenced by supports().
ilDBPdo::supportsTransactions | ( | ) |
Implements ilDBInterface.
Definition at line 1453 of file class.ilDBPdo.php.
Referenced by supports().
ilDBPdo::tableColumnExists | ( | $table_name, | |
$column_name | |||
) |
$table_name | string |
$column_name | string |
Implements ilDBInterface.
Definition at line 436 of file class.ilDBPdo.php.
References loadModule(), and ilDBConstants\MODULE_MANAGER.
ilDBPdo::tableExists | ( | $table_name | ) |
$table_name | string |
Implements ilDBInterface.
Definition at line 419 of file class.ilDBPdo.php.
References $result.
ilDBPdo::uniqueConstraintExists | ( | $table, | |
array | $fields | ||
) |
$table | ||
array | $fields |
Implements ilDBPdoInterface.
Definition at line 1975 of file class.ilDBPdo.php.
References $c, and Vendor\Package\$f.
ilDBPdo::unixTimestamp | ( | ) |
ilDBPdo::unlockTables | ( | ) |
Implements ilDBInterface.
Definition at line 1032 of file class.ilDBPdo.php.
ilDBPdo::update | ( | $table_name, | |
$columns, | |||
$where | |||
) |
$table_name | string |
$values | array |
$where | array |
Implements ilDBInterface.
Definition at line 666 of file class.ilDBPdo.php.
References $columns, ilDBInterface\execute(), ilDBInterface\free(), manipulateF(), prepareManip(), quote(), quoteIdentifier(), and sanitizeMB4StringIfNotSupported().
ilDBPdo::upper | ( | $a_exp | ) |
$a_exp |
Implements ilDBInterface.
Definition at line 1348 of file class.ilDBPdo.php.
ilDBPdo::useSlave | ( | $bool | ) |
$bool |
TODO
Implements ilDBInterface.
Definition at line 1101 of file class.ilDBPdo.php.
|
protected |
Definition at line 84 of file class.ilDBPdo.php.
Referenced by addTableColumn(), and getAttributes().
|
protected |
Definition at line 40 of file class.ilDBPdo.php.
Referenced by generateDSN(), getCharset(), and setCharset().
|
protected |
Definition at line 91 of file class.ilDBPdo.php.
Referenced by getDBType().
|
protected |
Definition at line 36 of file class.ilDBPdo.php.
Referenced by generateDSN(), getDbname(), and setDbname().
|
protected |
Definition at line 80 of file class.ilDBPdo.php.
Referenced by getDSN().
|
protected |
Definition at line 95 of file class.ilDBPdo.php.
Referenced by getLastErrorCode().
|
protected |
Definition at line 99 of file class.ilDBPdo.php.
Referenced by getFieldDefinition(), modifyTableColumn(), and setFieldDefinition().
|
protected |
Definition at line 32 of file class.ilDBPdo.php.
Referenced by generateDSN(), getHost(), setDBHost(), and setHost().
|
protected |
Definition at line 68 of file class.ilDBPdo.php.
Referenced by appendLimit(), and setLimit().
|
protected |
Definition at line 60 of file class.ilDBPdo.php.
Referenced by addUniqueConstraint(), and loadModule().
|
protected |
Definition at line 72 of file class.ilDBPdo.php.
Referenced by ilDBPdoPostgreSQL\appendLimit(), and setLimit().
|
protected |
Definition at line 48 of file class.ilDBPdo.php.
Referenced by getPassword(), setDBPassword(), and setPassword().
|
protected |
Definition at line 56 of file class.ilDBPdo.php.
|
protected |
Definition at line 52 of file class.ilDBPdo.php.
Referenced by generateDSN(), getPort(), setDBPort(), and setPort().
|
protected |
Definition at line 64 of file class.ilDBPdo.php.
Referenced by loadModule().
|
protected |
Definition at line 76 of file class.ilDBPdo.php.
Referenced by getStorageEngine(), and setStorageEngine().
|
protected |
Definition at line 44 of file class.ilDBPdo.php.
Referenced by getUsername(), and setUsername().
const ilDBPdo::FEATURE_FULLTEXT = 'fulltext' |
Definition at line 27 of file class.ilDBPdo.php.
const ilDBPdo::FEATURE_SLAVE = 'slave' |
Definition at line 28 of file class.ilDBPdo.php.
const ilDBPdo::FEATURE_TRANSACTIONS = 'transactions' |
Definition at line 26 of file class.ilDBPdo.php.