blob: ab9056ffb8fceeee0c7980d2c6e532511d904359 [file] [log] [blame]
Andrey Andreev7f55d612012-01-26 13:44:28 +02001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Esen Sagynov2e087942011-08-09 23:35:01 -07002/**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 5.1.6 or newer
6 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05007 * NOTICE OF LICENSE
Andrey Andreev7f55d612012-01-26 13:44:28 +02008 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05009 * Licensed under the Open Software License version 3.0
Andrey Andreev7f55d612012-01-26 13:44:28 +020010 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -050011 * This source file is subject to the Open Software License (OSL 3.0) that is
12 * bundled with this package in the files license.txt / license.rst. It is
13 * also available through the world wide web at this URL:
14 * http://opensource.org/licenses/OSL-3.0
15 * If you did not receive a copy of the license and are unable to obtain it
16 * through the world wide web, please send an email to
17 * licensing@ellislab.com so we can send you a copy immediately.
18 *
Esen Sagynov2e087942011-08-09 23:35:01 -070019 * @package CodeIgniter
Derek Jonesf4a4bd82011-10-20 12:18:42 -050020 * @author EllisLab Dev Team
Greg Aker0defe5d2012-01-01 18:46:41 -060021 * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/)
Derek Jonesf4a4bd82011-10-20 12:18:42 -050022 * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
Esen Sagynov2e087942011-08-09 23:35:01 -070023 * @link http://codeigniter.com
Andrey Andreev394a3f12012-02-15 14:35:11 +020024 * @since Version 3.0
Esen Sagynov2e087942011-08-09 23:35:01 -070025 * @filesource
26 */
27
Esen Sagynov2e087942011-08-09 23:35:01 -070028/**
29 * CUBRID Utility Class
30 *
31 * @category Database
Esen Sagynov2ab2b1e2011-08-11 00:41:16 -070032 * @author Esen Sagynov
Esen Sagynov2e087942011-08-09 23:35:01 -070033 * @link http://codeigniter.com/user_guide/database/
34 */
35class CI_DB_cubrid_utility extends CI_DB_utility {
36
37 /**
38 * List databases
39 *
Esen Sagynov2e087942011-08-09 23:35:01 -070040 * @return array
41 */
Andrey Andreev394a3f12012-02-15 14:35:11 +020042 public function list_databases()
Esen Sagynov2e087942011-08-09 23:35:01 -070043 {
Andrey Andreev394a3f12012-02-15 14:35:11 +020044 return $this->data_cache['db_names'] = cubrid_list_dbs($this->db->conn_id);
Esen Sagynov2e087942011-08-09 23:35:01 -070045 }
46
47 // --------------------------------------------------------------------
48
49 /**
50 * Optimize table query
51 *
52 * Generates a platform-specific query so that a table can be optimized
53 *
Esen Sagynov2e087942011-08-09 23:35:01 -070054 * @param string the table name
Andrey Andreev7f55d612012-01-26 13:44:28 +020055 * @return bool
Esen Sagynov2e087942011-08-09 23:35:01 -070056 * @link http://www.cubrid.org/manual/840/en/Optimize%20Database
57 */
Andrey Andreev7f55d612012-01-26 13:44:28 +020058 public function _optimize_table($table)
Esen Sagynov2e087942011-08-09 23:35:01 -070059 {
60 // No SQL based support in CUBRID as of version 8.4.0. Database or
61 // table optimization can be performed using CUBRID Manager
62 // database administration tool. See the link above for more info.
63 return FALSE;
64 }
65
66 // --------------------------------------------------------------------
67
68 /**
69 * Repair table query
70 *
71 * Generates a platform-specific query so that a table can be repaired
72 *
Esen Sagynov2e087942011-08-09 23:35:01 -070073 * @param string the table name
Andrey Andreev7f55d612012-01-26 13:44:28 +020074 * @return bool
Esen Sagynov2e087942011-08-09 23:35:01 -070075 * @link http://www.cubrid.org/manual/840/en/Checking%20Database%20Consistency
76 */
Andrey Andreev7f55d612012-01-26 13:44:28 +020077 public function _repair_table($table)
Esen Sagynov2e087942011-08-09 23:35:01 -070078 {
79 // Not supported in CUBRID as of version 8.4.0. Database or
80 // table consistency can be checked using CUBRID Manager
81 // database administration tool. See the link above for more info.
82 return FALSE;
83 }
84
85 // --------------------------------------------------------------------
86 /**
87 * CUBRID Export
88 *
Esen Sagynov2e087942011-08-09 23:35:01 -070089 * @param array Preferences
90 * @return mixed
91 */
Andrey Andreev7f55d612012-01-26 13:44:28 +020092 public function _backup($params = array())
Esen Sagynov2e087942011-08-09 23:35:01 -070093 {
94 // No SQL based support in CUBRID as of version 8.4.0. Database or
95 // table backup can be performed using CUBRID Manager
96 // database administration tool.
97 return $this->db->display_error('db_unsuported_feature');
98 }
99}
100
101/* End of file cubrid_utility.php */
Andrey Andreev7f55d612012-01-26 13:44:28 +0200102/* Location: ./system/database/drivers/cubrid/cubrid_utility.php */