Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

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