diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-03 02:19:28 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-03 02:19:28 +0100 |
commit | 08856b8738ea4fc17b13986c9f2619383cb4a6e9 (patch) | |
tree | f214c1498b4ec7cc1958b3654353748954a2a141 /system/database/drivers/sqlite/sqlite_driver.php | |
parent | 75b2c7fd0e23afc5c0338a7b62854d38b37b9c62 (diff) |
Improve DB version() implementation and add pg_version() support
Diffstat (limited to 'system/database/drivers/sqlite/sqlite_driver.php')
-rw-r--r-- | system/database/drivers/sqlite/sqlite_driver.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 3e4b37320..3eaec949c 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -141,14 +141,15 @@ class CI_DB_sqlite_driver extends CI_DB { // -------------------------------------------------------------------- /** - * Version number query string + * Database version number * - * @access public * @return string */ - function _version() + public function version() { - return sqlite_libversion(); + return isset($this->data_cache['version']) + ? $this->data_cache['version'] + : $this->data_cache['version'] = sqlite_libversion(); } // -------------------------------------------------------------------- |