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