43 public function connect($return_false_on_error =
false);
61 public function createTable($table_name, $fields, $drop_table =
false, $ignore_erros =
false);
115 public function dropTable($table_name, $error_if_not_existing =
true);
244 public function addIndex($table_name, $fields, $index_name =
'', $fulltext =
false);
345 public function like($column,
$type, $value =
"?", $case_insensitive =
true);
425 public function prepare($a_query, $a_types =
null, $a_result_types =
null);
531 public function locate($a_needle, $a_string, $a_start_pos = 1);
681 public function groupConcat($a_field_name, $a_seperator =
",", $a_order =
null);
689 public function cast($a_field_name, $a_dest_type);
728 public function escape($value, $escape_wildcards =
false);
An exception for terminatinating execution or to throw for unit testing.
const MYSQL_ENGINE_INNODB
const MYSQL_COLLATION_UTF8MB4
if(array_key_exists('yes', $_REQUEST)) $attributes
prepare($a_query, $a_types=null, $a_result_types=null)
Prepare a query (SELECT) statement to be used with execute.
setLimit($limit, $offset)
enableResultBuffering($a_status)
update($table_name, $values, $where)
static getReservedWords()
Get reserved words.
useSlave($bool)
Return false iff slave is not supported.
execute($stmt, $data=array())
fetchAssoc($query_result)
dropFulltextIndex($a_table, $a_name)
lockTables($tables)
Abstraction of lock table.
sequenceExists($sequence)
addPrimaryKey($table_name, $primary_keys)
locate($a_needle, $a_string, $a_start_pos=1)
addTableColumn($table_name, $column_name, $attributes)
sanitizeMB4StringIfNotSupported($query)
equals($columns, $value, $type, $emptyOrNull=false)
indexExistsByFields($table_name, $fields)
initFromIniFile($tmpClientIniFile=null)
quoteIdentifier($identifier, $check_option=false)
createDatabase($a_name, $a_charset="utf8", $a_collation="")
query($query)
Run a (read-only) Query on the database.
setStorageEngine($storage_engine)
modifyTableColumn($table, $column, $attributes)
replace($table, $primaryKeys, $otherColumns)
Replace into method.
like($column, $type, $value="?", $case_insensitive=true)
Generate a like subquery.
constraintName($a_table, $a_constraint)
renameTable($old_name, $new_name)
dropTable($table_name, $error_if_not_existing=true)
tableColumnExists($table_name, $column_name)
dropIndexByFields($table_name, $afields)
groupConcat($a_field_name, $a_seperator=",", $a_order=null)
createSequence($table_name, $start=1)
dropSequence($table_name)
cast($a_field_name, $a_dest_type)
addFulltextIndex($table_name, $afields, $a_name='in')
getPrimaryKeyIdentifier()
prepareManip($a_query, $a_types=null)
manipulate($query)
Run a (write) Query on the database.
getSequenceName($table_name)
fetchObject($query_result)
static isReservedWord($a_word)
connect($return_false_on_error=false)
dropIndex($a_table, $a_name="i1")
insert($table_name, $values)
addIndex($table_name, $fields, $index_name='', $fulltext=false)
doesCollationSupportMB4Strings()
fetchAll($query_result, $fetch_mode=ilDBConstants::FETCHMODE_ASSOC)
in($field, $values, $negate=false, $type="")
renameTableColumn($table_name, $column_old_name, $column_new_name)
concat(array $values, $allow_null=true)
isFulltextIndex($a_table, $a_name)
manipulateF($query, $types, $values)
createTable($table_name, $fields, $drop_table=false, $ignore_erros=false)
dropTableColumn($table_name, $column_name)
queryF($query, $types, $values)
unlockTables()
Unlock tables locked by previous lock table calls.
Interface ilDBPdoInterface.
executeMultiple($stmt, $data)
escape($value, $escape_wildcards=false)
queryCol($query, $type=ilDBConstants::FETCHMODE_DEFAULT, $colnum=0)
uniqueConstraintExists($table, array $fields)
autoExecute($tablename, $fields, $mode=ilDBConstants::AUTOQUERY_INSERT, $where=false)
Generate an insert, update or delete query and call prepare() and execute() on it.
migrateAllTablesToCollation($collation=ilDBConstants::MYSQL_COLLATION_UTF8MB4)
getDBVersion()
returns the Version of the Database (e.g.
fromUnixtime($expr, $to_text=true)
dropPrimaryKey($table_name)
supportsEngineMigration()
addUniqueConstraint($table, $fields, $name="con")
supportsCollationMigration()
dropUniqueConstraintByFields($table, $fields)
prepare($query, $types=null, $result_types=null)
dropUniqueConstraint($table, $name="con")
migrateAllTablesToEngine($engine=ilDBConstants::MYSQL_ENGINE_INNODB)
getServerVersion($native=false)
queryRow($query, $types=null, $fetchmode=ilDBConstants::FETCHMODE_DEFAULT)
if($modEnd===false) $module
if(empty($password)) $table