diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-04-09 15:11:56 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-04-09 15:11:56 +0200 |
commit | b457a4001ce2380e97f36b0a983b477c3e31de69 (patch) | |
tree | aa06c44f5ba73e4bb76320ca79e230084de85d2e /system/database/drivers/pdo/pdo_utility.php | |
parent | a0d4e417ef994628f67a75b2acdb5bb62971e803 (diff) |
DB Utility improvements
- Replaced driver methods _list_databases(), _optimize_table() and _repair_table() with properties
- Added defaults for optimize_table() and repair_table() SQL strings (FALSE, as those are mostly MySQL-specific)
- Added MSSQL/SQLSRV support for optimize_table() (actually rebuilds table indexes)
- Switched public driver methods to protected
- Improved CUBRID support for list_databases() as it used to only return the currently used database
- Minor speed improvements
Diffstat (limited to 'system/database/drivers/pdo/pdo_utility.php')
-rw-r--r-- | system/database/drivers/pdo/pdo_utility.php | 59 |
1 files changed, 2 insertions, 57 deletions
diff --git a/system/database/drivers/pdo/pdo_utility.php b/system/database/drivers/pdo/pdo_utility.php index 86c798397..930842118 100644 --- a/system/database/drivers/pdo/pdo_utility.php +++ b/system/database/drivers/pdo/pdo_utility.php @@ -34,62 +34,7 @@ */ class CI_DB_pdo_utility extends CI_DB_utility { - /** - * List databases - * - * @return bool - */ - public function _list_databases() - { - // Not sure if PDO lets you list all databases... - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Optimize table query - * - * Generates a platform-specific query so that a table can be optimized - * - * @param string the table name - * @return bool - */ - public function _optimize_table($table) - { - // Not a supported PDO feature - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Repair table query - * - * Generates a platform-specific query so that a table can be repaired - * - * @param string the table name - * @return bool - */ - public function _repair_table($table) - { - // Not a supported PDO feature - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- + protected $_list_databases = FALSE; /** * PDO Export @@ -97,7 +42,7 @@ class CI_DB_pdo_utility extends CI_DB_utility { * @param array Preferences * @return mixed */ - public function _backup($params = array()) + protected function _backup($params = array()) { // Currently unsupported return $this->db->display_error('db_unsuported_feature'); |