blob: 9cf8b2ea4df68dc5c9ab19e077e6a89c48316583 [file] [log] [blame]
Esen Sagynov2e087942011-08-09 23:35:01 -07001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2/**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 5.1.6 or newer
6 *
7 * @package CodeIgniter
8 * @author Esen Sagynov
9 * @copyright Copyright (c) 2008 - 2011, 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 * CUBRID Utility Class
20 *
21 * @category Database
22 * @author ExpressionEngine Dev Team
23 * @link http://codeigniter.com/user_guide/database/
24 */
25class CI_DB_cubrid_utility extends CI_DB_utility {
26
27 /**
28 * List databases
29 *
30 * @access private
31 * @return array
32 */
33 function _list_databases()
34 {
35 // CUBRID does not allow to see the list of all databases on the
36 // server. It is the way its architecture is designed. Every
37 // database is independent and isolated.
38 // For this reason we can return only the name of the currect
39 // connected database.
40 if ($this->conn_id)
41 {
42 return "SELECT '" . $this->database . "'";
43 }
44 else{
45 return FALSE;
46 }
47 }
48
49 // --------------------------------------------------------------------
50
51 /**
52 * Optimize table query
53 *
54 * Generates a platform-specific query so that a table can be optimized
55 *
56 * @access private
57 * @param string the table name
58 * @return object
59 * @link http://www.cubrid.org/manual/840/en/Optimize%20Database
60 */
61 function _optimize_table($table)
62 {
63 // No SQL based support in CUBRID as of version 8.4.0. Database or
64 // table optimization can be performed using CUBRID Manager
65 // database administration tool. See the link above for more info.
66 return FALSE;
67 }
68
69 // --------------------------------------------------------------------
70
71 /**
72 * Repair table query
73 *
74 * Generates a platform-specific query so that a table can be repaired
75 *
76 * @access private
77 * @param string the table name
78 * @return object
79 * @link http://www.cubrid.org/manual/840/en/Checking%20Database%20Consistency
80 */
81 function _repair_table($table)
82 {
83 // Not supported in CUBRID as of version 8.4.0. Database or
84 // table consistency can be checked using CUBRID Manager
85 // database administration tool. See the link above for more info.
86 return FALSE;
87 }
88
89 // --------------------------------------------------------------------
90 /**
91 * CUBRID Export
92 *
93 * @access private
94 * @param array Preferences
95 * @return mixed
96 */
97 function _backup($params = array())
98 {
99 // No SQL based support in CUBRID as of version 8.4.0. Database or
100 // table backup can be performed using CUBRID Manager
101 // database administration tool.
102 return $this->db->display_error('db_unsuported_feature');
103 }
104}
105
106/* End of file cubrid_utility.php */
107/* Location: ./system/database/drivers/cubrid/cubrid_utility.php */