Take two:
[www-register-wizard.git] / database / drivers / odbc / odbc_utility.php
1 <?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');\r
2 /**\r
3  * CodeIgniter\r
4  *\r
5  * An open source application development framework for PHP 4.3.2 or newer\r
6  *\r
7  * @package             CodeIgniter\r
8  * @author              ExpressionEngine Dev Team\r
9  * @copyright   Copyright (c) 2008, EllisLab, Inc.\r
10  * @license             http://codeigniter.com/user_guide/license.html\r
11  * @link                http://codeigniter.com\r
12  * @since               Version 1.0\r
13  * @filesource\r
14  */\r
15 \r
16 // ------------------------------------------------------------------------\r
17 \r
18 /**\r
19  * ODBC Utility Class\r
20  *\r
21  * @category    Database\r
22  * @author              ExpressionEngine Dev Team\r
23  * @link                http://codeigniter.com/database/\r
24  */\r
25 class CI_DB_odbc_utility extends CI_DB_utility {\r
26 \r
27         /**\r
28          * List databases\r
29          *\r
30          * @access      private\r
31          * @return      bool\r
32          */\r
33         function _list_databases()\r
34         {\r
35                 // Not sure if ODBC lets you list all databases...      \r
36                 if ($this->db->db_debug)\r
37                 {\r
38                         return $this->db->display_error('db_unsuported_feature');\r
39                 }\r
40                 return FALSE;\r
41         }\r
42 \r
43         // --------------------------------------------------------------------\r
44 \r
45         /**\r
46          * Optimize table query\r
47          *\r
48          * Generates a platform-specific query so that a table can be optimized\r
49          *\r
50          * @access      private\r
51          * @param       string  the table name\r
52          * @return      object\r
53          */\r
54         function _optimize_table($table)\r
55         {\r
56                 // Not a supported ODBC feature \r
57                 if ($this->db->db_debug)\r
58                 {\r
59                         return $this->db->display_error('db_unsuported_feature');\r
60                 }\r
61                 return FALSE;\r
62         }\r
63 \r
64         // --------------------------------------------------------------------\r
65 \r
66         /**\r
67          * Repair table query\r
68          *\r
69          * Generates a platform-specific query so that a table can be repaired\r
70          *\r
71          * @access      private\r
72          * @param       string  the table name\r
73          * @return      object\r
74          */\r
75         function _repair_table($table)\r
76         {\r
77                 // Not a supported ODBC feature \r
78                 if ($this->db->db_debug)\r
79                 {\r
80                         return $this->db->display_error('db_unsuported_feature');\r
81                 }\r
82                 return FALSE;\r
83         }\r
84 \r
85         // --------------------------------------------------------------------\r
86 \r
87         /**\r
88          * ODBC Export\r
89          *\r
90          * @access      private\r
91          * @param       array   Preferences\r
92          * @return      mixed\r
93          */\r
94         function _backup($params = array())\r
95         {\r
96                 // Currently unsupported\r
97                 return $this->db->display_error('db_unsuported_feature');\r
98         }\r
99         \r
100         /**\r
101          *\r
102          * The functions below have been deprecated as of 1.6, and are only here for backwards\r
103          * compatibility.  They now reside in dbforge().  The use of dbutils for database manipulation\r
104          * is STRONGLY discouraged in favour if using dbforge.\r
105          *\r
106          */\r
107 \r
108         /**\r
109          * Create database\r
110          *\r
111          * @access      private\r
112          * @param       string  the database name\r
113          * @return      bool\r
114          */\r
115         function _create_database()\r
116         {\r
117                 // ODBC has no "create database" command since it's\r
118                 // designed to connect to an existing database\r
119                 if ($this->db->db_debug)\r
120                 {\r
121                         return $this->db->display_error('db_unsuported_feature');\r
122                 }\r
123                 return FALSE;\r
124         }\r
125 \r
126         // --------------------------------------------------------------------\r
127 \r
128         /**\r
129          * Drop database\r
130          *\r
131          * @access      private\r
132          * @param       string  the database name\r
133          * @return      bool\r
134          */\r
135         function _drop_database($name)\r
136         {\r
137                 // ODBC has no "drop database" command since it's\r
138                 // designed to connect to an existing database          \r
139                 if ($this->db->db_debug)\r
140                 {\r
141                         return $this->db->display_error('db_unsuported_feature');\r
142                 }\r
143                 return FALSE;\r
144         }\r
145 }\r
146 \r
147 /* End of file odbc_utility.php */\r
148 /* Location: ./system/database/drivers/odbc/odbc_utility.php */