Corrected misnamed get_dbs() methods

This commit is contained in:
Timothy Warren 2012-02-02 19:07:26 -05:00
parent 9808bdcbac
commit f9b4e5128a
5 changed files with 22 additions and 15 deletions

View File

@ -67,14 +67,13 @@ class firebird {
}
/**
* Gets all the databases for the current connection
* List tables for the current database
*
* @return mixed
*/
function get_dbs()
function get_tables()
{
// I don't think this is possible with Firebird
return FALSE;
//TODO: implement
}
}

View File

@ -49,11 +49,11 @@ class MySQL extends DB_PDO {
}
/**
* Returns the datbases available for the current connection
* Returns the tables available in the current database
*
* @return array
*/
function get_dbs()
function get_tables()
{
$sql = "SHOW TABLES";
$res = $this->query($sql);

View File

@ -26,7 +26,16 @@ class ODBC extends DB_PDO {
parent::__construct("odbc:$dsn", $username, $password, $options);
}
function get_dbs(){}
/**
* List tables for the current database
*
* @return mixed
*/
function get_tables()
{
//Not possible reliably with this driver
return FALSE;
}
}

View File

@ -44,11 +44,11 @@ class pgSQL extends DB_PDO {
}
/**
* Get the list of databases for the current db connection
* Get the list of tables for the current db
*
* @return array
*/
function get_dbs()
function get_tables()
{
$sql = 'SELECT "tablename" FROM "pg_tables"
WHERE "tablename" NOT LIKE pg\_%
@ -62,7 +62,7 @@ class pgSQL extends DB_PDO {
}
/**
* Get a list of views for the current db connection
* Get a list of views for the current db
*
* @return array
*/

View File

@ -44,14 +44,13 @@ class SQLite extends DB_PDO {
}
/**
* List databases for the current connection
* List tables for the current database
*
* @return mixed
*/
function get_dbs()
function get_tables()
{
// SQLite doesn't have a way of doing this
return FALSE;
//TODO: implement
}
}