3 require_once(
'./Services/Database/classes/PDO/FieldDefinition/class.ilDBPdoMySQLFieldDefinition.php');
4 require_once(
'class.ilDBPdo.php');
29 $this->pdo->query(
"SET SESSION sql_mode = 'IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';");
46 PDO::MYSQL_ATTR_USE_BUFFERED_QUERY =>
true,
47 PDO::ATTR_TIMEOUT => 300 * 60,
57 $engines = $this->
queryCol(
'SHOW ENGINES');
58 if (!in_array(
$engine, $engines)) {
65 $this->pdo->exec(
"ALTER TABLE {$table} ENGINE={$engine}");
67 $errors[$table] = $e->getMessage();
79 public function nextId($table_name) {
81 $seqcol_name =
'sequence';
82 $query =
"INSERT INTO $sequence_name ($seqcol_name) VALUES (NULL)";
85 }
catch (PDOException $e) {
89 $result = $this->
query(
'SELECT LAST_INSERT_ID() AS next');
90 $value =
$result->fetchObject()->next;
92 if (is_numeric($value)) {
93 $query =
"DELETE FROM $sequence_name WHERE $seqcol_name < $value";
getSequenceName($table_name)
migrateAllTablesToEngine($engine=ilDBConstants::MYSQL_ENGINE_INNODB)
supportsEngineMigration()
queryCol($query, $type=PDO::FETCH_ASSOC, $colnum=0)
quoteIdentifier($identifier, $check_option=false)
const MYSQL_ENGINE_INNODB
Create styles array
The data for the language used.
doesCollationSupportMB4Strings()
Class ilDBPdoMySQLFieldDefinition.
getAdditionalAttributes()