00001 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 00002 /** 00003 * CodeIgniter 00004 * 00005 * An open source application development framework for PHP 4.3.2 or newer 00006 * 00007 * @package CodeIgniter 00008 * @author ExpressionEngine Dev Team 00009 * @copyright Copyright (c) 2006, EllisLab, Inc. 00010 * @license http://codeigniter.com/user_guide/license.html 00011 * @link http://codeigniter.com 00012 * @since Version 1.0 00013 * @filesource 00014 */ 00015 00016 // ------------------------------------------------------------------------ 00017 00018 /** 00019 * ODBC Utility Class 00020 * 00021 * @category Database 00022 * @author ExpressionEngine Dev Team 00023 * @link http://codeigniter.com/database/ 00024 */ 00025 class CI_DB_odbc_utility extends CI_DB_utility { 00026 00027 /** 00028 * List databases 00029 * 00030 * @access private 00031 * @return bool 00032 */ 00033 function _list_databases() 00034 { 00035 // Not sure if ODBC lets you list all databases... 00036 if ($this->db->db_debug) 00037 { 00038 return $this->db->display_error('db_unsuported_feature'); 00039 } 00040 return FALSE; 00041 } 00042 00043 // -------------------------------------------------------------------- 00044 00045 /** 00046 * Optimize table query 00047 * 00048 * Generates a platform-specific query so that a table can be optimized 00049 * 00050 * @access private 00051 * @param string the table name 00052 * @return object 00053 */ 00054 function _optimize_table($table) 00055 { 00056 // Not a supported ODBC feature 00057 if ($this->db->db_debug) 00058 { 00059 return $this->db->display_error('db_unsuported_feature'); 00060 } 00061 return FALSE; 00062 } 00063 00064 // -------------------------------------------------------------------- 00065 00066 /** 00067 * Repair table query 00068 * 00069 * Generates a platform-specific query so that a table can be repaired 00070 * 00071 * @access private 00072 * @param string the table name 00073 * @return object 00074 */ 00075 function _repair_table($table) 00076 { 00077 // Not a supported ODBC feature 00078 if ($this->db->db_debug) 00079 { 00080 return $this->db->display_error('db_unsuported_feature'); 00081 } 00082 return FALSE; 00083 } 00084 00085 // -------------------------------------------------------------------- 00086 00087 /** 00088 * ODBC Export 00089 * 00090 * @access private 00091 * @param array Preferences 00092 * @return mixed 00093 */ 00094 function _backup($params = array()) 00095 { 00096 // Currently unsupported 00097 return $this->db->display_error('db_unsuported_feature'); 00098 } 00099 00100 /** 00101 * 00102 * The functions below have been deprecated as of 1.6, and are only here for backwards 00103 * compatibility. They now reside in dbforge(). The use of dbutils for database manipulation 00104 * is STRONGLY discouraged in favour if using dbforge. 00105 * 00106 */ 00107 00108 /** 00109 * Create database 00110 * 00111 * @access private 00112 * @param string the database name 00113 * @return bool 00114 */ 00115 function _create_database() 00116 { 00117 // ODBC has no "create database" command since it's 00118 // designed to connect to an existing database 00119 if ($this->db->db_debug) 00120 { 00121 return $this->db->display_error('db_unsuported_feature'); 00122 } 00123 return FALSE; 00124 } 00125 00126 // -------------------------------------------------------------------- 00127 00128 /** 00129 * Drop database 00130 * 00131 * @access private 00132 * @param string the database name 00133 * @return bool 00134 */ 00135 function _drop_database($name) 00136 { 00137 // ODBC has no "drop database" command since it's 00138 // designed to connect to an existing database 00139 if ($this->db->db_debug) 00140 { 00141 return $this->db->display_error('db_unsuported_feature'); 00142 } 00143 return FALSE; 00144 } 00145 } 00146 00147 /* End of file odbc_utility.php */ 00148 /* Location: ./system/database/drivers/odbc/odbc_utility.php */