ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
interface.ilDBInterface.php
Go to the documentation of this file.
1<?php
2
9interface ilDBInterface
10{
11
16
23
30 public static function getReservedWords();
31
32
36 public function initFromIniFile($tmpClientIniFile = null);
37
38
43 public function connect($return_false_on_error = false);
44
45
51 public function nextId($table_name);
52
53
61 public function createTable($table_name, $fields, $drop_table = false, $ignore_erros = false);
62
63
68 public function addPrimaryKey($table_name, $primary_keys);
69
70
75 public function createSequence($table_name, $start = 1);
76
77
82 public function getSequenceName($table_name);
83
84
90 public function tableExists($table_name);
91
92
99 public function tableColumnExists($table_name, $column_name);
100
101
107 public function addTableColumn($table_name, $column_name, $attributes);
108
109
115 public function dropTable($table_name, $error_if_not_existing = true);
116
117
124 public function renameTable($old_name, $new_name);
125
126
140 public function query($query);
141
142
148 public function fetchAll($query_result, $fetch_mode = ilDBConstants::FETCHMODE_ASSOC);
149
150
154 public function dropSequence($table_name);
155
156
161 public function dropTableColumn($table_name, $column_name);
162
163
169 public function renameTableColumn($table_name, $column_old_name, $column_new_name);
170
171
177 public function insert($table_name, $values);
178
179
185 public function fetchObject($query_result);
186
187
194 public function update($table_name, $values, $where);
195
196
209 public function manipulate($query);
210
211
217 public function fetchAssoc($query_result);
218
219
225 public function numRows($query_result);
226
227
234 public function quote($value, $type);
235
236
244 public function addIndex($table_name, $fields, $index_name = '', $fulltext = false);
245
246
253 public function indexExistsByFields($table_name, $fields);
254
259 // public function fetchRow($fetchMode = ilDBConstants::FETCHMODE_ASSOC);
260
264 public function getDSN();
265
266
270 public function getDBType();
271
272
280 public function lockTables($tables);
281
282
289 public function unlockTables();
290
291
299 public function in($field, $values, $negate = false, $type = "");
300
301
308 public function queryF($query, $types, $values);
309
310
317 public function manipulateF($query, $types, $values);
318
319
326 public function useSlave($bool);
327
328
333 public function setLimit($limit, $offset);
334
335
345 public function like($column, $type, $value = "?", $case_insensitive = true);
346
347
351 public function now();
352
353
361 public function replace($table, $primaryKeys, $otherColumns);
362
363
371 public function equals($columns, $value, $type, $emptyOrNull = false);
372
373
377 public function setDBUser($user);
378
379
383 public function setDBPort($port);
384
385
389 public function setDBPassword($password);
390
391
395 public function setDBHost($host);
396
397
402 public function upper($a_exp);
403
404
409 public function lower($a_exp);
410
411
416 public function substr($a_exp);
417
425 public function prepare($a_query, $a_types = null, $a_result_types = null);
426
427
433 public function prepareManip($a_query, $a_types = null);
434
435
439 public function enableResultBuffering($a_status);
440
441
448 public function execute($stmt, $data = array());
449
454 public function sequenceExists($sequence);
455
456
460 public function listSequences();
461
462
463
464 //
465 // type-specific methods
466 //
467
472 public function supports($feature);
473
474
478 public function supportsFulltext();
479
480
484 public function supportsSlave();
485
486
490 public function supportsTransactions();
491
492 //
493 //
494 //
498 public function listTables();
499
500
508 public function loadModule($module);
509
510
514 public function getAllowedAttributes();
515
516
522 public function concat(array $values, $allow_null = true);
523
524
531 public function locate($a_needle, $a_string, $a_start_pos = 1);
532
533
539 public function quoteIdentifier($identifier, $check_option = false);
540
541
548 public function modifyTableColumn($table, $column, $attributes);
549
550
555 public function free($a_st);
556
557
562 public function checkTableName($a_name);
563
564
569 public static function isReservedWord($a_word);
570
571
576 public function beginTransaction();
577
578
583 public function commit();
584
585
590 public function rollback();
591
592
598 public function constraintName($a_table, $a_constraint);
599
600
606 public function dropIndex($a_table, $a_name = "i1");
607
608
615 public function createDatabase($a_name, $a_charset = "utf8", $a_collation = "");
616
617
623 public function dropIndexByFields($table_name, $afields);
624
625
629 public function getPrimaryKeyIdentifier();
630
631
638 public function addFulltextIndex($table_name, $afields, $a_name = 'in');
639
640
646 public function dropFulltextIndex($a_table, $a_name);
647
648
654 public function isFulltextIndex($a_table, $a_name);
655
656
660 public function setStorageEngine($storage_engine);
661
662
666 public function getStorageEngine();
667
668
672 public function buildAtomQuery();
673
674
681 public function groupConcat($a_field_name, $a_seperator = ",", $a_order = null);
682
683
689 public function cast($a_field_name, $a_dest_type);
690}
if(! $in) $columns
Definition: Utf8Test.php:45
An exception for terminatinating execution or to throw for unit testing.
$password
Definition: cron.php:14
Interface ilDBInterface.
substr($a_exp)
prepare($a_query, $a_types=null, $a_result_types=null)
Prepare a query (SELECT) statement to be used with execute.
loadModule($module)
setLimit($limit, $offset)
enableResultBuffering($a_status)
setDBUser($user)
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)
supports($feature)
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)
getDSN()
Get DSN.
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)
upper($a_exp)
dropIndexByFields($table_name, $afields)
tableExists($table_name)
setDBHost($host)
setDBPort($port)
groupConcat($a_field_name, $a_seperator=",", $a_order=null)
createSequence($table_name, $start=1)
getDBType()
Get DSN.
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)
checkTableName($a_name)
fetchObject($query_result)
static isReservedWord($a_word)
quote($value, $type)
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()
lower($a_exp)
setDBPassword($password)
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)
numRows($query_result)
dropTableColumn($table_name, $column_name)
queryF($query, $types, $values)
nextId($table_name)
unlockTables()
Unlock tables locked by previous lock table calls.
$attributes
Definition: metadata.php:231
$query
$type
$data
Definition: storeScorm.php:23