[DATABASE] Switch from PEAR DB to MDB2

This commit is contained in:
Alexei Sorokin
2020-09-14 22:46:29 +03:00
parent 96f1cc1a5c
commit fde929b151
97 changed files with 48799 additions and 16730 deletions

View File

@@ -193,8 +193,8 @@ class PgsqlSchema extends Schema
*/
public function fetchMetaInfo($table, $infoTable, $orderBy = null)
{
$catalog = $this->conn->dsn['database'];
return $this->fetchQueryData(sprintf(
$catalog = $this->conn->getDatabase();
$info = $this->fetchQueryData(sprintf(
<<<'END'
SELECT * FROM information_schema.%1$s
WHERE table_catalog = '%2$s' AND table_name = '%3$s'%4$s;
@@ -204,6 +204,10 @@ class PgsqlSchema extends Schema
$table,
($orderBy ? " ORDER BY {$orderBy}" : '')
));
return array_map(function (array $cols): array {
return array_change_key_case($cols, CASE_LOWER);
}, $info);
}
/**