summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/cubrid
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-03 02:19:28 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-03 02:19:28 +0100
commit08856b8738ea4fc17b13986c9f2619383cb4a6e9 (patch)
treef214c1498b4ec7cc1958b3654353748954a2a141 /system/database/drivers/cubrid
parent75b2c7fd0e23afc5c0338a7b62854d38b37b9c62 (diff)
Improve DB version() implementation and add pg_version() support
Diffstat (limited to 'system/database/drivers/cubrid')
-rw-r--r--system/database/drivers/cubrid/cubrid_driver.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php
index cb33919a4..afdaef351 100644
--- a/system/database/drivers/cubrid/cubrid_driver.php
+++ b/system/database/drivers/cubrid/cubrid_driver.php
@@ -156,19 +156,15 @@ class CI_DB_cubrid_driver extends CI_DB {
// --------------------------------------------------------------------
/**
- * Version number query string
+ * Database version number
*
- * @access public
* @return string
*/
- function _version()
+ public function version()
{
- // To obtain the CUBRID Server version, no need to run the SQL query.
- // CUBRID PHP API provides a function to determin this value.
- // This is why we also need to add 'cubrid' value to the list of
- // $driver_version_exceptions array in DB_driver class in
- // version() function.
- return cubrid_get_server_info($this->conn_id);
+ return isset($this->data_cache['version'])
+ ? $this->data_cache['version']
+ : $this->data_cache['version'] = cubrid_get_server_info($this->conn_id);
}
// --------------------------------------------------------------------