|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Interface ilDBInterface. More...
Inheritance diagram for ilDBInterface:
Collaboration diagram for ilDBInterface:Public Member Functions | |
| doesCollationSupportMB4Strings () | |
| sanitizeMB4StringIfNotSupported ($query) | |
| initFromIniFile ($tmpClientIniFile=null) | |
| connect ($return_false_on_error=false) | |
| nextId ($table_name) | |
| createTable ($table_name, $fields, $drop_table=false, $ignore_erros=false) | |
| addPrimaryKey ($table_name, $primary_keys) | |
| createSequence ($table_name, $start=1) | |
| getSequenceName ($table_name) | |
| tableExists ($table_name) | |
| tableColumnExists ($table_name, $column_name) | |
| addTableColumn ($table_name, $column_name, $attributes) | |
| dropTable ($table_name, $error_if_not_existing=true) | |
| renameTable ($old_name, $new_name) | |
| query ($query) | |
| Run a (read-only) Query on the database. More... | |
| fetchAll ($query_result, $fetch_mode=ilDBConstants::FETCHMODE_ASSOC) | |
| 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, $values, $where) | |
| manipulate ($query) | |
| Run a (write) Query on the database. More... | |
| fetchAssoc ($query_result) | |
| numRows ($query_result) | |
| quote ($value, $type) | |
| addIndex ($table_name, $fields, $index_name='', $fulltext=false) | |
| indexExistsByFields ($table_name, $fields) | |
| getDSN () | |
| Get DSN. More... | |
| getDBType () | |
| Get DSN. More... | |
| lockTables ($tables) | |
| Abstraction of lock table. More... | |
| unlockTables () | |
| Unlock tables locked by previous lock table calls. More... | |
| in ($field, $values, $negate=false, $type="") | |
| queryF ($query, $types, $values) | |
| manipulateF ($query, $types, $values) | |
| useSlave ($bool) | |
| Return false iff slave is not supported. More... | |
| setLimit ($limit, $offset) | |
| like ($column, $type, $value="?", $case_insensitive=true) | |
| Generate a like subquery. More... | |
| now () | |
| replace ($table, $primaryKeys, $otherColumns) | |
| Replace into method. More... | |
| equals ($columns, $value, $type, $emptyOrNull=false) | |
| setDBUser ($user) | |
| setDBPort ($port) | |
| setDBPassword ($password) | |
| setDBHost ($host) | |
| upper ($a_exp) | |
| lower ($a_exp) | |
| substr ($a_exp) | |
| prepare ($a_query, $a_types=null, $a_result_types=null) | |
| Prepare a query (SELECT) statement to be used with execute. More... | |
| prepareManip ($a_query, $a_types=null) | |
| enableResultBuffering ($a_status) | |
| execute ($stmt, $data=array()) | |
| sequenceExists ($sequence) | |
| listSequences () | |
| supports ($feature) | |
| supportsFulltext () | |
| supportsSlave () | |
| supportsTransactions () | |
| listTables () | |
| loadModule ($module) | |
| getAllowedAttributes () | |
| concat (array $values, $allow_null=true) | |
| locate ($a_needle, $a_string, $a_start_pos=1) | |
| quoteIdentifier ($identifier, $check_option=false) | |
| modifyTableColumn ($table, $column, $attributes) | |
| free ($a_st) | |
| checkTableName ($a_name) | |
| beginTransaction () | |
| commit () | |
| rollback () | |
| constraintName ($a_table, $a_constraint) | |
| dropIndex ($a_table, $a_name="i1") | |
| createDatabase ($a_name, $a_charset="utf8", $a_collation="") | |
| dropIndexByFields ($table_name, $afields) | |
| getPrimaryKeyIdentifier () | |
| addFulltextIndex ($table_name, $afields, $a_name='in') | |
| dropFulltextIndex ($a_table, $a_name) | |
| isFulltextIndex ($a_table, $a_name) | |
| setStorageEngine ($storage_engine) | |
| getStorageEngine () | |
| buildAtomQuery () | |
| groupConcat ($a_field_name, $a_seperator=",", $a_order=null) | |
| cast ($a_field_name, $a_dest_type) | |
Static Public Member Functions | |
| static | getReservedWords () |
| Get reserved words. More... | |
| static | isReservedWord ($a_word) |
Interface ilDBInterface.
Definition at line 9 of file interface.ilDBInterface.php.
| ilDBInterface::addFulltextIndex | ( | $table_name, | |
| $afields, | |||
$a_name = 'in' |
|||
| ) |
| $table_name | ||
| $afields | ||
| string | $a_name |
Implemented in ilDBPdo, and ilDBPdoMySQLInnoDB.
| ilDBInterface::addIndex | ( | $table_name, | |
| $fields, | |||
$index_name = '', |
|||
$fulltext = false |
|||
| ) |
| $table_name | ||
| $fields | ||
| string | $index_name | |
| bool | $fulltext |
Implemented in ilDBPdo, and ilDBPdoPostgreSQL.
Referenced by ilMySQLAbstraction\addIndices().
Here is the caller graph for this function:| ilDBInterface::addPrimaryKey | ( | $table_name, | |
| $primary_keys | |||
| ) |
| $table_name | string |
| $primary_keys | array |
Implemented in ilDBPdo, and ilDBPdoPostgreSQL.
Referenced by ilMySQLAbstraction\addPrimaryKey().
Here is the caller graph for this function:| ilDBInterface::addTableColumn | ( | $table_name, | |
| $column_name, | |||
| $attributes | |||
| ) |
| $table_name | string |
| $column_name | string |
| $attributes | array |
Implemented in ilDBPdo.
| ilDBInterface::beginTransaction | ( | ) |
| ilDBInterface::buildAtomQuery | ( | ) |
Implemented in ilDBPdo, and ilDBPdoMySQLGalera.
| ilDBInterface::cast | ( | $a_field_name, | |
| $a_dest_type | |||
| ) |
| ilDBInterface::checkTableName | ( | $a_name | ) |
| ilDBInterface::commit | ( | ) |
| ilDBInterface::concat | ( | array | $values, |
$allow_null = true |
|||
| ) |
| ilDBInterface::connect | ( | $return_false_on_error = false | ) |
| bool | $return_false_on_error |
Implemented in ilDBPdo, and ilDBPdoPostgreSQL.
Referenced by ilDatabaseBaseTest\connect(), ilDatabaseImplementationBaseTest\connect(), ilDbSetup\createDatabase(), ilDbSetup\installDatabase(), ilDbSetup\isConnectable(), and ilDbSetup\isDatabaseConnectable().
Here is the caller graph for this function:| ilDBInterface::constraintName | ( | $a_table, | |
| $a_constraint | |||
| ) |
| ilDBInterface::createDatabase | ( | $a_name, | |
$a_charset = "utf8", |
|||
$a_collation = "" |
|||
| ) |
| $a_name | ||
| string | $a_charset | |
| string | $a_collation |
Implemented in ilDBPdo.
Referenced by ilDbSetup\createDatabase().
Here is the caller graph for this function:| ilDBInterface::createSequence | ( | $table_name, | |
$start = 1 |
|||
| ) |
| $table_name | ||
| int | $start |
Implemented in ilDBPdo, and ilDBPdoPostgreSQL.
Referenced by ilMySQLAbstraction\addAutoIncrementSequence().
Here is the caller graph for this function:| ilDBInterface::createTable | ( | $table_name, | |
| $fields, | |||
$drop_table = false, |
|||
$ignore_erros = false |
|||
| ) |
| $table_name | ||
| $fields | ||
| bool | $drop_table | |
| bool | $ignore_erros |
Implemented in ilDBPdo, and ilDBPdoPostgreSQL.
| ilDBInterface::doesCollationSupportMB4Strings | ( | ) |
Implemented in ilDBPdo, and ilDBPdoMySQL.
| ilDBInterface::dropFulltextIndex | ( | $a_table, | |
| $a_name | |||
| ) |
| ilDBInterface::dropIndex | ( | $a_table, | |
$a_name = "i1" |
|||
| ) |
| $a_table | ||
| string | $a_name |
Implemented in ilDBPdo.
Referenced by ilMySQLAbstraction\fixIndexNames().
Here is the caller graph for this function:| ilDBInterface::dropIndexByFields | ( | $table_name, | |
| $afields | |||
| ) |
| ilDBInterface::dropSequence | ( | $table_name | ) |
| $table_name | string |
Implemented in ilDBPdo.
| ilDBInterface::dropTable | ( | $table_name, | |
$error_if_not_existing = true |
|||
| ) |
| $table_name | ||
| bool | $error_if_not_existing |
Implemented in ilDBPdoPostgreSQL, and ilDBPdo.
| ilDBInterface::dropTableColumn | ( | $table_name, | |
| $column_name | |||
| ) |
| $table_name | string |
| $column_name | string |
Implemented in ilDBPdo.
| ilDBInterface::enableResultBuffering | ( | $a_status | ) |
| $a_status |
Implemented in ilDBPdo.
| ilDBInterface::equals | ( | $columns, | |
| $value, | |||
| $type, | |||
$emptyOrNull = false |
|||
| ) |
| ilDBInterface::execute | ( | $stmt, | |
$data = array() |
|||
| ) |
| $stmt | ||
| array | $data |
| ilDatabaseException |
Referenced by ilDBPdo\autoExecute(), ilDbSetup\readDumpUltraSmall(), ilMySQLAbstraction\storeStep(), and ilDBPdo\update().
Here is the caller graph for this function:| ilDBInterface::fetchAll | ( | $query_result, | |
$fetch_mode = ilDBConstants::FETCHMODE_ASSOC |
|||
| ) |
| $query_result | ||
| int | $fetch_mode |
| ilDBInterface::fetchAssoc | ( | $query_result | ) |
| $query_result | ilDBStatement |
Implemented in ilDBPdo.
Referenced by ilMySQLAbstraction\addAutoIncrementSequence().
Here is the caller graph for this function:| ilDBInterface::fetchObject | ( | $query_result | ) |
| ilDBInterface::free | ( | $a_st | ) |
| $a_st |
Referenced by ilDBPdo\autoExecute(), and ilDBPdo\update().
Here is the caller graph for this function:| ilDBInterface::getAllowedAttributes | ( | ) |
Implemented in ilDBPdo.
| ilDBInterface::getDBType | ( | ) |
Get DSN.
This must be overwritten in DBMS specific class.
Implemented in ilDBPdo.
Referenced by ilDbSetup\createDatabase(), ilDbSetup\installDatabase(), and ilDbSetup\isConnectable().
Here is the caller graph for this function:| ilDBInterface::getDSN | ( | ) |
Get DSN.
| int | $fetchMode |
Implemented in ilDBPdo.
| ilDBInterface::getPrimaryKeyIdentifier | ( | ) |
Implemented in ilDBPdo, and ilDBPdoPostgreSQL.
|
static |
Get reserved words.
This must be overwritten in DBMS specific class. This is mainly used to check whether a new identifier can be problematic because it is a reserved word. So createTable / alterTable usually check these.
| ilDBInterface::getSequenceName | ( | $table_name | ) |
| ilDBInterface::getStorageEngine | ( | ) |
Implemented in ilDBPdo, and ilDBPdoPostgreSQL.
| ilDBInterface::groupConcat | ( | $a_field_name, | |
$a_seperator = ",", |
|||
$a_order = null |
|||
| ) |
| string | $a_field_name | |
| string | $a_seperator | |
| string | $a_order |
Implemented in ilDBPdo.
| ilDBInterface::in | ( | $field, | |
| $values, | |||
$negate = false, |
|||
$type = "" |
|||
| ) |
| ilDBInterface::indexExistsByFields | ( | $table_name, | |
| $fields | |||
| ) |
| ilDBInterface::initFromIniFile | ( | $tmpClientIniFile = null | ) |
| null | $tmpClientIniFile |
Implemented in ilDBPdo.
Referenced by ilDbSetup\__construct(), ilDatabaseBaseTest\connect(), ilDatabaseImplementationBaseTest\connect(), and ilDbSetup\createDatabase().
Here is the caller graph for this function:| ilDBInterface::insert | ( | $table_name, | |
| $values | |||
| ) |
| ilDBInterface::isFulltextIndex | ( | $a_table, | |
| $a_name | |||
| ) |
|
static |
| $a_word |
Implemented in ilDBPdo.
Referenced by ilDatabaseReservedWordsTest\testReservedPDO().
Here is the caller graph for this function:| ilDBInterface::like | ( | $column, | |
| $type, | |||
$value = "?", |
|||
$case_insensitive = true |
|||
| ) |
Generate a like subquery.
| string | $column | |
| string | $type | |
| mixed | $value | |
| bool | $case_insensitive |
Implemented in ilDBPdo.
| ilDBInterface::listSequences | ( | ) |
Implemented in ilDBPdo.
| ilDBInterface::listTables | ( | ) |
Implemented in ilDBPdo.
Referenced by ilDbSetup\dropTables(), and ilDbSetup\isDatabaseInstalled().
Here is the caller graph for this function:| ilDBInterface::loadModule | ( | $module | ) |
| ilDBInterface::locate | ( | $a_needle, | |
| $a_string, | |||
$a_start_pos = 1 |
|||
| ) |
| ilDBInterface::lockTables | ( | $tables | ) |
Abstraction of lock table.
| array | table definitions |
Implemented in ilDBPdoPostgreSQL, and ilDBPdo.
| ilDBInterface::lower | ( | $a_exp | ) |
| ilDBInterface::manipulate | ( | $query | ) |
Run a (write) Query on the database.
The implementation MUST start and stop a $ilBench Database-Benchmark, e.g.:
$ilBench->startDbBench($sql); .... [run the query] $ilBench->stopDbBench();
| $query | string |
Implemented in ilDBPdo.
Referenced by ilDbSetup\dropTables(), ilGlossaryDefinition\moveUp(), and ilDbSetup\readDumpSmall().
Here is the caller graph for this function:| ilDBInterface::manipulateF | ( | $query, | |
| $types, | |||
| $values | |||
| ) |
| ilDBInterface::modifyTableColumn | ( | $table, | |
| $column, | |||
| $attributes | |||
| ) |
| $table | |
| $column | |
| $attributes |
Implemented in ilDBPdo.
Referenced by ilMySQLAbstraction\fixClobNotNull(), ilMySQLAbstraction\fixDatetimeValues(), and ilMySQLAbstraction\removeAutoIncrement().
Here is the caller graph for this function:| ilDBInterface::nextId | ( | $table_name | ) |
| $table_name | string |
Implemented in ilDBPdo, ilDBPdoMySQL, and ilDBPdoPostgreSQL.
| ilDBInterface::now | ( | ) |
Implemented in ilDBPdo.
| ilDBInterface::numRows | ( | $query_result | ) |
| ilDBInterface::prepare | ( | $a_query, | |
$a_types = null, |
|||
$a_result_types = null |
|||
| ) |
Prepare a query (SELECT) statement to be used with execute.
| string | $a_query |
Implemented in ilDBPdo, and ilDBPdoInterface.
| ilDBInterface::prepareManip | ( | $a_query, | |
$a_types = null |
|||
| ) |
| $a_query | ||
| null | $a_types |
Implemented in ilDBPdo.
Referenced by ilDbSetup\readDumpUltraSmall(), and ilMySQLAbstraction\storeStep().
Here is the caller graph for this function:| ilDBInterface::query | ( | $query | ) |
Run a (read-only) Query on the database.
The implementation MUST start and stop a $ilBench Database-Benchmark, e.g.:
$ilBench->startDbBench($sql); .... [run the query] $ilBench->stopDbBench();
| $query | string |
Implemented in ilDBPdo.
Referenced by ilMySQLAbstraction\addAutoIncrementSequence(), ilDbSetup\readDump(), ilMySQLAbstraction\removeConstraints(), and ilMySQLAbstraction\removeIndices().
Here is the caller graph for this function:| ilDBInterface::queryF | ( | $query, | |
| $types, | |||
| $values | |||
| ) |
| ilDBInterface::quote | ( | $value, | |
| $type | |||
| ) |
| ilDBInterface::quoteIdentifier | ( | $identifier, | |
$check_option = false |
|||
| ) |
| $identifier | ||
| bool | $check_option |
Implemented in ilDBPdo, and ilDBPdoPostgreSQL.
| ilDBInterface::renameTable | ( | $old_name, | |
| $new_name | |||
| ) |
| ilDBInterface::renameTableColumn | ( | $table_name, | |
| $column_old_name, | |||
| $column_new_name | |||
| ) |
| $table_name | string |
| $column_old_name | string |
| $column_new_name | string |
Implemented in ilDBPdo.
| ilDBInterface::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" => ...) |
Implemented in ilDBPdoPostgreSQL, and ilDBPdo.
| ilDBInterface::rollback | ( | ) |
| ilDBInterface::sanitizeMB4StringIfNotSupported | ( | $query | ) |
| $query | string to sanitize, all MB4-Characters like emojis will re replaced with ??? |
Implemented in ilDBPdo.
| ilDBInterface::sequenceExists | ( | $sequence | ) |
| ilDBInterface::setDBHost | ( | $host | ) |
| $host |
Implemented in ilDBPdo.
| ilDBInterface::setDBPassword | ( | $password | ) |
| $password |
Implemented in ilDBPdo.
| ilDBInterface::setDBPort | ( | $port | ) |
| $port |
Implemented in ilDBPdo.
| ilDBInterface::setDBUser | ( | $user | ) |
| $user |
Implemented in ilDBPdo.
| ilDBInterface::setLimit | ( | $limit, | |
| $offset | |||
| ) |
| $limit | |
| $offset |
Implemented in ilDBPdo.
| ilDBInterface::setStorageEngine | ( | $storage_engine | ) |
| $storage_engine |
Implemented in ilDBPdo, and ilDBPdoPostgreSQL.
| ilDBInterface::substr | ( | $a_exp | ) |
| $a_exp |
| ilDBInterface::supports | ( | $feature | ) |
| ilDBInterface::supportsFulltext | ( | ) |
Implemented in ilDBPdo, ilDBPdoMySQLInnoDB, ilDBPdoMySQLMyISAM, and ilDBPdoPostgreSQL.
| ilDBInterface::supportsSlave | ( | ) |
Implemented in ilDBPdo.
| ilDBInterface::supportsTransactions | ( | ) |
Implemented in ilDBPdo, ilDBPdoMySQL, ilDBPdoMySQLGalera, ilDBPdoMySQLInnoDB, and ilDBPdoPostgreSQL.
| ilDBInterface::tableColumnExists | ( | $table_name, | |
| $column_name | |||
| ) |
| $table_name | string |
| $column_name | string |
Implemented in ilDBPdo, and ilDBPdoPostgreSQL.
| ilDBInterface::tableExists | ( | $table_name | ) |
| $table_name | string |
Implemented in ilDBPdo, and ilDBPdoPostgreSQL.
Referenced by ilMySQLAbstraction\fixClobNotNull(), ilMySQLAbstraction\fixDatetimeValues(), ilMySQLAbstraction\fixIndexNames(), and ilMySQLAbstraction\replaceEmptyDatesWithNull().
Here is the caller graph for this function:| ilDBInterface::unlockTables | ( | ) |
Unlock tables locked by previous lock table calls.
Implemented in ilDBPdo, and ilDBPdoPostgreSQL.
| ilDBInterface::update | ( | $table_name, | |
| $values, | |||
| $where | |||
| ) |
| ilDBInterface::upper | ( | $a_exp | ) |
| ilDBInterface::useSlave | ( | $bool | ) |