mirror of
https://github.com/dg/dibi.git
synced 2025-08-04 21:28:02 +02:00
removed unused code
This commit is contained in:
@@ -34,11 +34,6 @@ class MySqlReflector implements Dibi\Reflector
|
||||
*/
|
||||
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 = [];
|
||||
while ($row = $res->fetch(FALSE)) {
|
||||
@@ -58,12 +53,6 @@ class MySqlReflector implements Dibi\Reflector
|
||||
*/
|
||||
public function getColumns($table)
|
||||
{
|
||||
/*$table = $this->escapeText($table);
|
||||
$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->escapeIdentifier($table)}");
|
||||
$columns = [];
|
||||
while ($row = $res->fetch(TRUE)) {
|
||||
@@ -91,13 +80,6 @@ class MySqlReflector implements Dibi\Reflector
|
||||
*/
|
||||
public function getIndexes($table)
|
||||
{
|
||||
/*$table = $this->escapeText($table);
|
||||
$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->escapeIdentifier($table)}");
|
||||
$indexes = [];
|
||||
while ($row = $res->fetch(TRUE)) {
|
||||
|
@@ -55,12 +55,6 @@ class SqliteReflector implements Dibi\Reflector
|
||||
*/
|
||||
public function getColumns($table)
|
||||
{
|
||||
$meta = $this->driver->query("
|
||||
SELECT sql FROM sqlite_master WHERE type = 'table' AND name = {$this->driver->escapeText($table)}
|
||||
UNION ALL
|
||||
SELECT sql FROM sqlite_temp_master WHERE type = 'table' AND name = {$this->driver->escapeText($table)}
|
||||
")->fetch(TRUE);
|
||||
|
||||
$res = $this->driver->query("PRAGMA table_info({$this->driver->escapeIdentifier($table)})");
|
||||
$columns = [];
|
||||
while ($row = $res->fetch(TRUE)) {
|
||||
|
@@ -217,7 +217,7 @@ final class Translator
|
||||
$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 {
|
||||
|
@@ -369,18 +369,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([self::getConnection(), $name], $args);
|
||||
}
|
||||
|
||||
|
||||
/********************* fluent SQL builders ****************d*g**/
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user