diff --git a/dibi/drivers/DibiMySqlReflector.php b/dibi/drivers/DibiMySqlReflector.php index f0163fcf..9889b620 100644 --- a/dibi/drivers/DibiMySqlReflector.php +++ b/dibi/drivers/DibiMySqlReflector.php @@ -30,11 +30,6 @@ class DibiMySqlReflector extends DibiObject implements IDibiReflector */ public function getTables() { - /*$this->query(" - SELECT TABLE_NAME as name, TABLE_TYPE = 'VIEW' as view - FROM INFORMATION_SCHEMA.TABLES - WHERE TABLE_SCHEMA = DATABASE() - ");*/ $res = $this->driver->query('SHOW FULL TABLES'); $tables = array(); while ($row = $res->fetch(FALSE)) { @@ -54,12 +49,6 @@ class DibiMySqlReflector extends DibiObject implements IDibiReflector */ public function getColumns($table) { - /*$table = $this->escape($table, dibi::TEXT); - $this->query(" - SELECT * - FROM INFORMATION_SCHEMA.COLUMNS - WHERE TABLE_NAME = $table AND TABLE_SCHEMA = DATABASE() - ");*/ $res = $this->driver->query("SHOW FULL COLUMNS FROM {$this->driver->escape($table, dibi::IDENTIFIER)}"); $columns = array(); while ($row = $res->fetch(TRUE)) { @@ -87,13 +76,6 @@ class DibiMySqlReflector extends DibiObject implements IDibiReflector */ public function getIndexes($table) { - /*$table = $this->escape($table, dibi::TEXT); - $this->query(" - SELECT * - FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE - WHERE TABLE_NAME = $table AND TABLE_SCHEMA = DATABASE() - AND REFERENCED_COLUMN_NAME IS NULL - ");*/ $res = $this->driver->query("SHOW INDEX FROM {$this->driver->escape($table, dibi::IDENTIFIER)}"); $indexes = array(); while ($row = $res->fetch(TRUE)) { diff --git a/dibi/drivers/DibiSqliteReflector.php b/dibi/drivers/DibiSqliteReflector.php index 4fe79382..675c2a68 100644 --- a/dibi/drivers/DibiSqliteReflector.php +++ b/dibi/drivers/DibiSqliteReflector.php @@ -51,12 +51,6 @@ class DibiSqliteReflector extends DibiObject implements IDibiReflector */ public function getColumns($table) { - $meta = $this->driver->query(" - SELECT sql FROM sqlite_master WHERE type = 'table' AND name = {$this->driver->escape($table, dibi::TEXT)} - UNION ALL - SELECT sql FROM sqlite_temp_master WHERE type = 'table' AND name = {$this->driver->escape($table, dibi::TEXT)} - ")->fetch(TRUE); - $res = $this->driver->query("PRAGMA table_info({$this->driver->escape($table, dibi::IDENTIFIER)})"); $columns = array(); while ($row = $res->fetch(TRUE)) { diff --git a/dibi/libs/Dibi.php b/dibi/libs/Dibi.php index a7bf67a4..dfe95c76 100644 --- a/dibi/libs/Dibi.php +++ b/dibi/libs/Dibi.php @@ -368,18 +368,6 @@ class dibi } - /** - * Replacement for majority of dibi::methods() in future. - */ - public static function __callStatic($name, $args) - { - //if ($name = 'select', 'update', ...') { - // return self::command()->$name($args); - //} - return call_user_func_array(array(self::getConnection(), $name), $args); - } - - /********************* fluent SQL builders ****************d*g**/ diff --git a/dibi/libs/DibiTranslator.php b/dibi/libs/DibiTranslator.php index 7f38113b..45d908ef 100644 --- a/dibi/libs/DibiTranslator.php +++ b/dibi/libs/DibiTranslator.php @@ -215,7 +215,7 @@ final class DibiTranslator extends DibiObject $v = $this->formatValue($v, FALSE); $vx[] = $k . ($v === 'NULL' ? 'IS ' : '= ') . $v; - } elseif ($pair[1] === 'ex') { // TODO: this will be removed + } elseif ($pair[1] === 'ex') { $vx[] = $k . $this->formatValue($v, 'ex'); } else {