From 39b622db9bda38282a32bb45623da63efe685729 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Wed, 16 Jan 2008 21:10:09 +0000 Subject: Many new Active Record functions, and another whack of stuff --- system/database/drivers/odbc/odbc_utility.php | 101 +++++++++++--------------- 1 file changed, 43 insertions(+), 58 deletions(-) (limited to 'system/database/drivers/odbc/odbc_utility.php') diff --git a/system/database/drivers/odbc/odbc_utility.php b/system/database/drivers/odbc/odbc_utility.php index 97e950fc1..d64d15af5 100644 --- a/system/database/drivers/odbc/odbc_utility.php +++ b/system/database/drivers/odbc/odbc_utility.php @@ -24,18 +24,15 @@ */ class CI_DB_odbc_utility extends CI_DB_utility { - /** - * Create database + * List databases * * @access private - * @param string the database name * @return bool */ - function _create_database() + function _list_databases() { - // ODBC has no "create database" command since it's - // designed to connect to an existing database + // Not sure if ODBC lets you list all databases... if ($this->db->db_debug) { return $this->db->display_error('db_unsuported_feature'); @@ -46,16 +43,17 @@ class CI_DB_odbc_utility extends CI_DB_utility { // -------------------------------------------------------------------- /** - * Drop database + * Optimize table query + * + * Generates a platform-specific query so that a table can be optimized * * @access private - * @param string the database name - * @return bool + * @param string the table name + * @return object */ - function _drop_database($name) + function _optimize_table($table) { - // ODBC has no "drop database" command since it's - // designed to connect to an existing database + // Not a supported ODBC feature if ($this->db->db_debug) { return $this->db->display_error('db_unsuported_feature'); @@ -66,14 +64,17 @@ class CI_DB_odbc_utility extends CI_DB_utility { // -------------------------------------------------------------------- /** - * List databases + * Repair table query + * + * Generates a platform-specific query so that a table can be repaired * * @access private - * @return bool + * @param string the table name + * @return object */ - function _list_databases() + function _repair_table($table) { - // Not sure if ODBC lets you list all databases... + // Not a supported ODBC feature if ($this->db->db_debug) { return $this->db->display_error('db_unsuported_feature'); @@ -84,35 +85,37 @@ class CI_DB_odbc_utility extends CI_DB_utility { // -------------------------------------------------------------------- /** - * Drop Table + * ODBC Export * * @access private - * @return bool + * @param array Preferences + * @return mixed */ - function _drop_table($table) + function _backup($params = array()) { - // Not a supported ODBC feature - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; + // Currently unsupported + return $this->db->display_error('db_unsuported_feature'); } - - // -------------------------------------------------------------------- - + /** - * Optimize table query * - * Generates a platform-specific query so that a table can be optimized + * The functions below have been deprecated as of 1.6, and are only here for backwards + * compatibility. They now reside in dbforge(). The use of dbutils for database manipulation + * is STRONGLY discouraged in favour if using dbforge. + * + */ + + /** + * Create database * * @access private - * @param string the table name - * @return object + * @param string the database name + * @return bool */ - function _optimize_table($table) + function _create_database() { - // Not a supported ODBC feature + // ODBC has no "create database" command since it's + // designed to connect to an existing database if ($this->db->db_debug) { return $this->db->display_error('db_unsuported_feature'); @@ -123,39 +126,21 @@ class CI_DB_odbc_utility extends CI_DB_utility { // -------------------------------------------------------------------- /** - * Repair table query - * - * Generates a platform-specific query so that a table can be repaired + * Drop database * * @access private - * @param string the table name - * @return object + * @param string the database name + * @return bool */ - function _repair_table($table) + function _drop_database($name) { - // Not a supported ODBC feature + // ODBC has no "drop database" command since it's + // designed to connect to an existing database if ($this->db->db_debug) { return $this->db->display_error('db_unsuported_feature'); } return FALSE; } - - // -------------------------------------------------------------------- - - /** - * ODBC Export - * - * @access private - * @param array Preferences - * @return mixed - */ - function _backup($params = array()) - { - // Currently unsupported - return $this->db->display_error('db_unsuported_feature'); - } - } - ?> \ No newline at end of file -- cgit v1.2.3-24-g4f1b