From 3dd978f680076be842bfcb5c9e2cbf35b926373b Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 30 Sep 2006 19:24:45 +0000 Subject: --- system/database/drivers/sqlite/sqlite_driver.php | 39 +++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'system/database/drivers/sqlite/sqlite_driver.php') diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 45dd7a892..f57c4b8c8 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -278,7 +278,44 @@ class CI_DB_sqlite_driver extends CI_DB { $row = $query->row(); return $row->numrows; } - + + // -------------------------------------------------------------------- + + /** + * List databases + * + * I don't believe you can do a database listing with SQLite + * since each database is its own file. I suppose we could + * try reading a directory looking for SQLite files, but + * that doesn't seem like a terribly good idea + * + * @access private + * @return bool + */ + function _list_databases() + { + if ($this->db_debug) + { + return $this->display_error('db_unsuported_feature'); + } + return array(); + } + + // -------------------------------------------------------------------- + + /** + * List table query + * + * Generates a platform-specific query string so that the table names can be fetched + * + * @access private + * @return string + */ + function _list_tables() + { + return "SELECT name from sqlite_master WHERE type='table'"; + } + // -------------------------------------------------------------------- /** -- cgit v1.2.3-24-g4f1b