mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Implementing listSources for postgres
This commit is contained in:
parent
aedf69dee1
commit
5c87daf083
2 changed files with 4 additions and 4 deletions
|
@ -161,8 +161,8 @@ class DboPostgres extends DboSource {
|
|||
}
|
||||
|
||||
$schema = $this->config['schema'];
|
||||
$sql = "SELECT table_name as name FROM INFORMATION_SCHEMA.tables WHERE table_schema = '{$schema}';";
|
||||
$result = $this->fetchAll($sql, false);
|
||||
$sql = "SELECT table_name as name FROM INFORMATION_SCHEMA.tables WHERE table_schema = ?";
|
||||
$result = $this->_execute($sql, array($schema));
|
||||
|
||||
if (!$result) {
|
||||
return array();
|
||||
|
@ -170,7 +170,7 @@ class DboPostgres extends DboSource {
|
|||
$tables = array();
|
||||
|
||||
foreach ($result as $item) {
|
||||
$tables[] = $item[0]['name'];
|
||||
$tables[] = $item->Name;
|
||||
}
|
||||
|
||||
parent::listSources($tables);
|
||||
|
|
|
@ -427,7 +427,7 @@ class DboPostgresTest extends CakeTestCase {
|
|||
|
||||
$db2 = clone $db1;
|
||||
$db2->connect();
|
||||
$this->assertNotEqual($db1->connection, $db2->connection);
|
||||
$this->assertNotSame($db1->getConnection(), $db2->getConnection());
|
||||
|
||||
$table = $db1->fullTableName('users', false);
|
||||
$password = '5f4dcc3b5aa765d61d8327deb882cf99';
|
||||
|
|
Loading…
Reference in a new issue