19declare(strict_types=1);
50 public function connect(
bool $return_false_on_error =
false): ?bool;
57 bool $drop_table =
false,
58 bool $ignore_erros =
false
61 public function addPrimaryKey(
string $table_name, array $primary_keys): bool;
71 public function addTableColumn(
string $table_name,
string $column_name, array $attributes): bool;
73 public function dropTable(
string $table_name,
bool $error_if_not_existing =
true): bool;
75 public function renameTable(
string $old_name,
string $new_name): bool;
88 public function renameTableColumn(
string $table_name,
string $column_old_name,
string $column_new_name): bool;
93 public function insert(
string $table_name, array $values):
int;
102 public function update(
string $table_name, array $values, array $where):
int;
117 public function quote($value,
string $type): string;
119 public function addIndex(
string $table_name, array $fields,
string $index_name =
'',
bool $fulltext =
false): bool;
146 public function in(
string $field, array $values,
bool $negate =
false,
string $type =
""): string;
164 public function setLimit(
int $limit,
int $offset = 0): void;
169 public function like(
string $column,
string $type,
string $value =
"?",
bool $case_insensitive =
true): string;
174 public function now(): string;
183 public function replace(
string $table, array $primary_keys, array $other_columns):
int;
185 public function equals(
string $columns, $value,
string $type,
bool $emptyOrNull =
false): string;
195 public function upper(
string $expression): string;
197 public function lower(
string $expression): string;
199 public function substr(
string $expression): string;
204 public function prepare(
string $a_query, ?array $a_types =
null, ?array $a_result_types =
null):
ilDBStatement;
247 public function concat(array $values,
bool $allow_null =
true): string;
249 public function locate(
string $needle,
string $string,
int $start_pos = 1): string;
251 public function quoteIdentifier(
string $identifier,
bool $check_option =
false): string;
278 public function dropIndex(
string $a_table,
string $a_name =
"i1"): bool;
280 public function createDatabase(
string $a_name,
string $a_charset =
"utf8",
string $a_collation =
""): bool;
286 public function addFulltextIndex(
string $table_name, array $afields,
string $a_name =
'in'): bool;
298 public function groupConcat(
string $a_field_name,
string $a_seperator =
",", ?
string $a_order =
null): string;
300 public function cast(
string $a_field_name,
string $a_dest_type): string;
307 string $foreign_key_name,
310 array $reference_field_names,
311 string $reference_table,
316 public function dropForeignKey(
string $foreign_key_name,
string $table_name): bool;
INIFile Parser Early access in init proceess! Avoid further dependencies like logging or other servic...
Interface ilAtomQuery Use ilAtomQuery to fire Database-Actions which have to be done without beeing i...
addTableColumn(string $table_name, string $column_name, array $attributes)
lockTables(array $tables)
Abstraction of lock table.
checkTableName(string $a_name)
update(string $table_name, array $values, array $where)
@description $where MUST contain existing columns only.
dropFulltextIndex(string $a_table, string $a_name)
setStorageEngine(string $storage_engine)
cast(string $a_field_name, string $a_dest_type)
addIndex(string $table_name, array $fields, string $index_name='', bool $fulltext=false)
addFulltextIndex(string $table_name, array $afields, string $a_name='in')
indexExistsByFields(string $table_name, array $fields)
insert(string $table_name, array $values)
concat(array $values, bool $allow_null=true)
quoteIdentifier(string $identifier, bool $check_option=false)
supports(string $feature)
dropTableColumn(string $table_name, string $column_name)
static getReservedWords()
Get reserved words.
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)
replace(string $table, array $primary_keys, array $other_columns)
Replace into method.
fetchObject(ilDBStatement $query_result)
sequenceExists(string $sequence)
nextId(string $table_name)
prepareManip(string $a_query, ?array $a_types=null)
execute(ilDBStatement $stmt, array $data=[])
constraintName(string $a_table, string $a_constraint)
connect(bool $return_false_on_error=false)
setLimit(int $limit, int $offset=0)
createDatabase(string $a_name, string $a_charset="utf8", string $a_collation="")
prepare(string $a_query, ?array $a_types=null, ?array $a_result_types=null)
Prepare a query (SELECT) statement to be used with execute.
fetchAll(ilDBStatement $statement, int $fetch_mode=ilDBConstants::FETCHMODE_ASSOC)
primaryExistsByFields(string $table_name, array $fields)
groupConcat(string $a_field_name, string $a_seperator=",", ?string $a_order=null)
like(string $column, string $type, string $value="?", bool $case_insensitive=true)
Generate a like subquery.
isFulltextIndex(string $a_table, string $a_name)
getSequenceName(string $table_name)
numRows(ilDBStatement $statement)
equals(string $columns, $value, string $type, bool $emptyOrNull=false)
dropForeignKey(string $foreign_key_name, string $table_name)
quote($value, string $type)
tableExists(string $table_name)
manipulate(string $query)
Run a (write) Query on the database.
manipulateF(string $query, array $types, array $values)
setDBPassword(string $password)
sanitizeMB4StringIfNotSupported(string $query)
dropTable(string $table_name, bool $error_if_not_existing=true)
locate(string $needle, string $string, int $start_pos=1)
query(string $query)
Run a (read-only) Query on the database.
tableColumnExists(string $table_name, string $column_name)
fetchAssoc(ilDBStatement $statement)
queryF(string $query, array $types, array $values)
dropIndexByFields(string $table_name, array $afields)
dropIndex(string $a_table, string $a_name="i1")
free(ilDBStatement $a_st)
getPrimaryKeyIdentifier()
createTable(string $table_name, array $fields, bool $drop_table=false, bool $ignore_erros=false)
foreignKeyExists(string $foreign_key_name, string $table_name)
lower(string $expression)
renameTable(string $old_name, string $new_name)
renameTableColumn(string $table_name, string $column_old_name, string $column_new_name)
modifyTableColumn(string $table, string $column, array $attributes)
addPrimaryKey(string $table_name, array $primary_keys)
in(string $field, array $values, bool $negate=false, string $type="")
doesCollationSupportMB4Strings()
enableResultBuffering(bool $a_status)
substr(string $expression)
createSequence(string $table_name, int $start=1)
initFromIniFile(?ilIniFile $ini=null)
dropSequence(string $table_name)
static isReservedWord(string $a_word)
upper(string $expression)
loadModule(string $module)
unlockTables()
Unlock tables locked by previous lock table calls.