ILIAS  trunk Revision v11.0_alpha-1689-g66c127b4ae8
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
interface.ilDBPdoInterface.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 {
26  public function getServerVersion(bool $native = false): int;
27 
28  public function queryCol(string $query, int $type = ilDBConstants::FETCHMODE_DEFAULT, int $colnum = 0): array;
29 
30  public function queryRow(
31  string $query,
32  ?array $types = null,
33  int $fetchmode = ilDBConstants::FETCHMODE_DEFAULT
34  ): array;
35 
36  public function escape(string $value, bool $escape_wildcards = false): string;
37 
38  public function escapePattern(string $text): string;
39 
40  public function migrateTableToEngine(string $table_name, string $engine = ilDBConstants::MYSQL_ENGINE_INNODB): void;
44  public function migrateAllTablesToEngine(string $engine = ilDBConstants::MYSQL_ENGINE_INNODB): array;
45 
46  public function supportsEngineMigration(): bool;
47 
48  public function migrateTableCollation(string $table_name, string $collation = ilDBConstants::MYSQL_COLLATION_UTF8MB4): bool;
52  public function migrateAllTablesToCollation(string $collation = ilDBConstants::MYSQL_COLLATION_UTF8MB4): array;
53 
54  public function supportsCollationMigration(): bool;
55 
56  public function addUniqueConstraint(string $table, array $fields, string $name = "con"): bool;
57 
58  public function dropUniqueConstraint(string $table, string $name = "con"): bool;
59 
60  public function dropUniqueConstraintByFields(string $table, array $fields): bool;
61 
62  public function checkIndexName(string $name): bool;
63 
64  public function getLastInsertId(): int;
65 
66  public function uniqueConstraintExists(string $table, array $fields): bool;
67 
68  public function dropPrimaryKey(string $table_name): bool;
69 
74  public function executeMultiple(ilDBStatement $stmt, array $data): array;
75 
76  public function fromUnixtime(string $expr, bool $to_text = true): string;
77 
78  public function unixTimestamp(): string;
79 
83  public function getDBVersion(): string;
84 }
migrateTableCollation(string $table_name, string $collation=ilDBConstants::MYSQL_COLLATION_UTF8MB4)
getDBVersion()
returns the Version of the Database (e.g.
dropPrimaryKey(string $table_name)
Interface ilDBPdoInterface.
addUniqueConstraint(string $table, array $fields, string $name="con")
fromUnixtime(string $expr, bool $to_text=true)
migrateTableToEngine(string $table_name, string $engine=ilDBConstants::MYSQL_ENGINE_INNODB)
dropUniqueConstraintByFields(string $table, array $fields)
queryCol(string $query, int $type=ilDBConstants::FETCHMODE_DEFAULT, int $colnum=0)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
checkIndexName(string $name)
migrateAllTablesToEngine(string $engine=ilDBConstants::MYSQL_ENGINE_INNODB)
executeMultiple(ilDBStatement $stmt, array $data)
migrateAllTablesToCollation(string $collation=ilDBConstants::MYSQL_COLLATION_UTF8MB4)
getServerVersion(bool $native=false)
dropUniqueConstraint(string $table, string $name="con")
queryRow(string $query, ?array $types=null, int $fetchmode=ilDBConstants::FETCHMODE_DEFAULT)
escapePattern(string $text)
uniqueConstraintExists(string $table, array $fields)
escape(string $value, bool $escape_wildcards=false)