blob: c89a924d32622066c16c971c528cea274da8a0ce [file] [log] [blame]
Andrey Andreevc5536aa2012-11-01 17:33:58 +02001<?php
Esen Sagynov2e087942011-08-09 23:35:01 -07002/**
3 * CodeIgniter
4 *
Phil Sturgeon07c1ac82012-03-09 17:03:37 +00005 * An open source application development framework for PHP 5.2.4 or newer
Esen Sagynov2e087942011-08-09 23:35:01 -07006 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05007 * NOTICE OF LICENSE
Andrey Andreev592f4ec2012-03-20 15:10:08 +02008 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05009 * Licensed under the Open Software License version 3.0
Andrey Andreev592f4ec2012-03-20 15:10:08 +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 Andreevcf631202012-02-16 11:36:28 +020024 * @since Version 2.1
Esen Sagynov2e087942011-08-09 23:35:01 -070025 * @filesource
26 */
Andrey Andreevc5536aa2012-11-01 17:33:58 +020027defined('BASEPATH') OR exit('No direct script access allowed');
Esen Sagynov2e087942011-08-09 23:35:01 -070028
Esen Sagynov2e087942011-08-09 23:35:01 -070029/**
30 * CUBRID Database Adapter Class
31 *
32 * Note: _DB is an extender class that the app controller
Jamie Rumbelow7efad202012-02-19 12:37:00 +000033 * creates dynamically based on whether the query builder
Esen Sagynov2e087942011-08-09 23:35:01 -070034 * class is being used or not.
35 *
36 * @package CodeIgniter
37 * @subpackage Drivers
38 * @category Database
Esen Sagynov2ab2b1e2011-08-11 00:41:16 -070039 * @author Esen Sagynov
Esen Sagynov2e087942011-08-09 23:35:01 -070040 * @link http://codeigniter.com/user_guide/database/
41 */
Esen Sagynov2ab2b1e2011-08-11 00:41:16 -070042class CI_DB_cubrid_driver extends CI_DB {
43
Andrey Andreeva24e52e2012-11-02 03:54:12 +020044 /**
45 * Database driver
46 *
47 * @var string
48 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +020049 public $dbdriver = 'cubrid';
Esen Sagynov2e087942011-08-09 23:35:01 -070050
Andrey Andreeva24e52e2012-11-02 03:54:12 +020051 /**
52 * Auto-commit flag
53 *
54 * @var bool
55 */
Andrey Andreeva00e5042012-03-26 12:23:13 +030056 public $auto_commit = TRUE;
57
Andrey Andreeva24e52e2012-11-02 03:54:12 +020058 // --------------------------------------------------------------------
59
Andrey Andreev5fd3ae82012-10-24 14:55:35 +030060 /**
Andrey Andreeva24e52e2012-11-02 03:54:12 +020061 * Identifier escape character
62 *
63 * @var string
64 */
65 protected $_escape_char = '`';
66
67 // --------------------------------------------------------------------
68
69 /**
70 * Class constructor
Andrey Andreev5fd3ae82012-10-24 14:55:35 +030071 *
72 * @param array $params
73 * @return void
74 */
Andrey Andreeva00e5042012-03-26 12:23:13 +030075 public function __construct($params)
76 {
77 parent::__construct($params);
78
79 if (preg_match('/^CUBRID:[^:]+(:[0-9][1-9]{0,4})?:[^:]+:[^:]*:[^:]*:(\?.+)?$/', $this->dsn, $matches))
80 {
81 if (stripos($matches[2], 'autocommit=off') !== FALSE)
82 {
83 $this->auto_commit = FALSE;
84 }
85 }
86 else
87 {
88 // If no port is defined by the user, use the default value
Andrey Andreeve4c30192012-06-04 15:08:24 +030089 empty($this->port) OR $this->port = 33000;
Andrey Andreeva00e5042012-03-26 12:23:13 +030090 }
91 }
Esen Sagynov2e087942011-08-09 23:35:01 -070092
Andrey Andreev2ea33c32012-10-04 12:37:51 +030093 // --------------------------------------------------------------------
94
Esen Sagynov2e087942011-08-09 23:35:01 -070095 /**
96 * Non-persistent database connection
97 *
Esen Sagynov2e087942011-08-09 23:35:01 -070098 * @return resource
99 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200100 public function db_connect()
Esen Sagynov2e087942011-08-09 23:35:01 -0700101 {
Andrey Andreeva00e5042012-03-26 12:23:13 +0300102 return $this->_cubrid_connect();
Esen Sagynov2e087942011-08-09 23:35:01 -0700103 }
104
105 // --------------------------------------------------------------------
106
107 /**
108 * Persistent database connection
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200109 *
Esen Sagynov2e087942011-08-09 23:35:01 -0700110 * In CUBRID persistent DB connection is supported natively in CUBRID
111 * engine which can be configured in the CUBRID Broker configuration
112 * file by setting the CCI_PCONNECT parameter to ON. In that case, all
113 * connections established between the client application and the
Andrey Andreeva00e5042012-03-26 12:23:13 +0300114 * server will become persistent.
Esen Sagynov2e087942011-08-09 23:35:01 -0700115 *
Esen Sagynov2e087942011-08-09 23:35:01 -0700116 * @return resource
117 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200118 public function db_pconnect()
Esen Sagynov2e087942011-08-09 23:35:01 -0700119 {
Andrey Andreeva00e5042012-03-26 12:23:13 +0300120 return $this->_cubrid_connect(TRUE);
121 }
122
123 // --------------------------------------------------------------------
124
125 /**
126 * CUBRID connection
127 *
128 * A CUBRID-specific method to create a connection to the database.
129 * Except for determining if a persistent connection should be used,
130 * the rest of the logic is the same for db_connect() and db_pconnect().
131 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200132 * @param bool $persistent
Andrey Andreeva00e5042012-03-26 12:23:13 +0300133 * @return resource
134 */
135 protected function _cubrid_connect($persistent = FALSE)
136 {
137 if (preg_match('/^CUBRID:[^:]+(:[0-9][1-9]{0,4})?:[^:]+:([^:]*):([^:]*):(\?.+)?$/', $this->dsn, $matches))
138 {
139 $_temp = ($persistent !== TRUE) ? 'cubrid_connect_with_url' : 'cubrid_pconnect_with_url';
140 $conn_id = ($matches[2] === '' && $matches[3] === '' && $this->username !== '' && $this->password !== '')
141 ? $_temp($this->dsn, $this->username, $this->password)
142 : $_temp($this->dsn);
143 }
144 else
145 {
146 $_temp = ($persistent !== TRUE) ? 'cubrid_connect' : 'cubrid_pconnect';
147 $conn_id = ($this->username !== '')
148 ? $_temp($this->hostname, $this->port, $this->database, $this->username, $this->password)
149 : $_temp($this->hostname, $this->port, $this->database);
150 }
151
152 return $conn_id;
Esen Sagynov2e087942011-08-09 23:35:01 -0700153 }
154
155 // --------------------------------------------------------------------
156
157 /**
158 * Reconnect
159 *
160 * Keep / reestablish the db connection if no queries have been
161 * sent for a length of time exceeding the server's idle timeout
162 *
Esen Sagynov2e087942011-08-09 23:35:01 -0700163 * @return void
164 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200165 public function reconnect()
Esen Sagynov2e087942011-08-09 23:35:01 -0700166 {
167 if (cubrid_ping($this->conn_id) === FALSE)
168 {
169 $this->conn_id = FALSE;
170 }
171 }
172
173 // --------------------------------------------------------------------
174
175 /**
Andrey Andreev08856b82012-03-03 03:19:28 +0200176 * Database version number
Esen Sagynov2e087942011-08-09 23:35:01 -0700177 *
Esen Sagynov2e087942011-08-09 23:35:01 -0700178 * @return string
179 */
Andrey Andreev08856b82012-03-03 03:19:28 +0200180 public function version()
Esen Sagynov2e087942011-08-09 23:35:01 -0700181 {
Andrey Andreev2b730372012-11-05 17:01:11 +0200182 if (isset($this->data_cache['version']))
183 {
184 return $this->data_cache['version'];
185 }
186 elseif ( ! $this->conn_id)
187 {
188 $this->initialize();
189 }
190
191 return ( ! $this->conn_id OR ($version = cubrid_get_server_info($this->conn_id)) === FALSE)
192 ? FALSE
193 : $this->data_cache['version'] = $version;
Esen Sagynov2e087942011-08-09 23:35:01 -0700194 }
195
196 // --------------------------------------------------------------------
197
198 /**
199 * Execute the query
200 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200201 * @param string $sql an SQL query
Esen Sagynov2e087942011-08-09 23:35:01 -0700202 * @return resource
203 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200204 protected function _execute($sql)
Esen Sagynov2e087942011-08-09 23:35:01 -0700205 {
Esen Sagynov2e087942011-08-09 23:35:01 -0700206 return @cubrid_query($sql, $this->conn_id);
207 }
208
209 // --------------------------------------------------------------------
210
211 /**
Esen Sagynov2e087942011-08-09 23:35:01 -0700212 * Begin Transaction
213 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200214 * @param bool $test_mode
Esen Sagynov2e087942011-08-09 23:35:01 -0700215 * @return bool
216 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200217 public function trans_begin($test_mode = FALSE)
Esen Sagynov2e087942011-08-09 23:35:01 -0700218 {
Esen Sagynov2e087942011-08-09 23:35:01 -0700219 // When transactions are nested we only begin/commit/rollback the outermost ones
Andrey Andreev7f55d612012-01-26 13:44:28 +0200220 if ( ! $this->trans_enabled OR $this->_trans_depth > 0)
Esen Sagynov2e087942011-08-09 23:35:01 -0700221 {
222 return TRUE;
223 }
224
225 // Reset the transaction failure flag.
226 // If the $test_mode flag is set to TRUE transactions will be rolled back
227 // even if the queries produce a successful result.
Andrey Andreev7f55d612012-01-26 13:44:28 +0200228 $this->_trans_failure = ($test_mode === TRUE);
Esen Sagynov2e087942011-08-09 23:35:01 -0700229
Esen Sagynov2ab2b1e2011-08-11 00:41:16 -0700230 if (cubrid_get_autocommit($this->conn_id))
231 {
232 cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_FALSE);
233 }
Esen Sagynov2e087942011-08-09 23:35:01 -0700234
235 return TRUE;
236 }
237
238 // --------------------------------------------------------------------
239
240 /**
241 * Commit Transaction
242 *
Esen Sagynov2e087942011-08-09 23:35:01 -0700243 * @return bool
244 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200245 public function trans_commit()
Esen Sagynov2e087942011-08-09 23:35:01 -0700246 {
Esen Sagynov2e087942011-08-09 23:35:01 -0700247 // When transactions are nested we only begin/commit/rollback the outermost ones
Andrey Andreev7f55d612012-01-26 13:44:28 +0200248 if ( ! $this->trans_enabled OR $this->_trans_depth > 0)
Esen Sagynov2e087942011-08-09 23:35:01 -0700249 {
250 return TRUE;
251 }
252
253 cubrid_commit($this->conn_id);
254
Esen Sagynov2ab2b1e2011-08-11 00:41:16 -0700255 if ($this->auto_commit && ! cubrid_get_autocommit($this->conn_id))
256 {
257 cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_TRUE);
258 }
259
Esen Sagynov2e087942011-08-09 23:35:01 -0700260 return TRUE;
261 }
262
263 // --------------------------------------------------------------------
264
265 /**
266 * Rollback Transaction
267 *
Esen Sagynov2e087942011-08-09 23:35:01 -0700268 * @return bool
269 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200270 public function trans_rollback()
Esen Sagynov2e087942011-08-09 23:35:01 -0700271 {
Esen Sagynov2e087942011-08-09 23:35:01 -0700272 // When transactions are nested we only begin/commit/rollback the outermost ones
Andrey Andreev7f55d612012-01-26 13:44:28 +0200273 if ( ! $this->trans_enabled OR $this->_trans_depth > 0)
Esen Sagynov2e087942011-08-09 23:35:01 -0700274 {
275 return TRUE;
276 }
277
278 cubrid_rollback($this->conn_id);
279
Esen Sagynov2ab2b1e2011-08-11 00:41:16 -0700280 if ($this->auto_commit && ! cubrid_get_autocommit($this->conn_id))
281 {
282 cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_TRUE);
283 }
284
Esen Sagynov2e087942011-08-09 23:35:01 -0700285 return TRUE;
286 }
287
288 // --------------------------------------------------------------------
289
290 /**
291 * Escape String
292 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200293 * @param string $str
294 * @param bool $like Whether or not the string will be used in a LIKE condition
Esen Sagynov2e087942011-08-09 23:35:01 -0700295 * @return string
296 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200297 public function escape_str($str, $like = FALSE)
Esen Sagynov2e087942011-08-09 23:35:01 -0700298 {
299 if (is_array($str))
300 {
301 foreach ($str as $key => $val)
Esen Sagynov2ab2b1e2011-08-11 00:41:16 -0700302 {
Esen Sagynov2e087942011-08-09 23:35:01 -0700303 $str[$key] = $this->escape_str($val, $like);
Esen Sagynov2ab2b1e2011-08-11 00:41:16 -0700304 }
Esen Sagynov2e087942011-08-09 23:35:01 -0700305
Esen Sagynov2ab2b1e2011-08-11 00:41:16 -0700306 return $str;
307 }
Esen Sagynov2e087942011-08-09 23:35:01 -0700308
Andrey Andreev394a3f12012-02-15 14:35:11 +0200309 if (function_exists('cubrid_real_escape_string') &&
310 (is_resource($this->conn_id)
311 OR (get_resource_type($this->conn_id) === 'Unknown' && preg_match('/Resource id #/', strval($this->conn_id)))))
Esen Sagynov2e087942011-08-09 23:35:01 -0700312 {
313 $str = cubrid_real_escape_string($str, $this->conn_id);
314 }
315 else
316 {
317 $str = addslashes($str);
318 }
319
320 // escape LIKE condition wildcards
321 if ($like === TRUE)
322 {
Andrey Andreev7f55d612012-01-26 13:44:28 +0200323 return str_replace(array('%', '_'), array('\\%', '\\_'), $str);
Esen Sagynov2e087942011-08-09 23:35:01 -0700324 }
325
326 return $str;
327 }
328
329 // --------------------------------------------------------------------
330
331 /**
332 * Affected Rows
333 *
Andrey Andreevea3eec92012-03-01 19:16:23 +0200334 * @return int
Esen Sagynov2e087942011-08-09 23:35:01 -0700335 */
Andrey Andreevea3eec92012-03-01 19:16:23 +0200336 public function affected_rows()
Esen Sagynov2e087942011-08-09 23:35:01 -0700337 {
Andrey Andreevea3eec92012-03-01 19:16:23 +0200338 return @cubrid_affected_rows();
Esen Sagynov2e087942011-08-09 23:35:01 -0700339 }
340
341 // --------------------------------------------------------------------
342
343 /**
344 * Insert ID
345 *
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200346 * @return int
Esen Sagynov2e087942011-08-09 23:35:01 -0700347 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200348 public function insert_id()
Esen Sagynov2e087942011-08-09 23:35:01 -0700349 {
350 return @cubrid_insert_id($this->conn_id);
351 }
352
353 // --------------------------------------------------------------------
354
355 /**
Esen Sagynov2e087942011-08-09 23:35:01 -0700356 * List table query
357 *
358 * Generates a platform-specific query string so that the table names can be fetched
359 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200360 * @param bool $prefix_limit
Esen Sagynov2e087942011-08-09 23:35:01 -0700361 * @return string
362 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200363 protected function _list_tables($prefix_limit = FALSE)
Esen Sagynov2e087942011-08-09 23:35:01 -0700364 {
Andrey Andreev7f55d612012-01-26 13:44:28 +0200365 $sql = 'SHOW TABLES';
Esen Sagynov2e087942011-08-09 23:35:01 -0700366
Alex Bilbie48a2baf2012-06-02 11:09:54 +0100367 if ($prefix_limit !== FALSE && $this->dbprefix !== '')
Esen Sagynov2e087942011-08-09 23:35:01 -0700368 {
Andrey Andreev7f55d612012-01-26 13:44:28 +0200369 return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'";
Esen Sagynov2e087942011-08-09 23:35:01 -0700370 }
371
372 return $sql;
373 }
374
375 // --------------------------------------------------------------------
376
377 /**
378 * Show column query
379 *
380 * Generates a platform-specific query string so that the column names can be fetched
381 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200382 * @param string $table
Esen Sagynov2e087942011-08-09 23:35:01 -0700383 * @return string
384 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200385 protected function _list_columns($table = '')
Esen Sagynov2e087942011-08-09 23:35:01 -0700386 {
Andrey Andreev032e7ea2012-03-06 19:48:35 +0200387 return 'SHOW COLUMNS FROM '.$this->protect_identifiers($table, TRUE, NULL, FALSE);
Esen Sagynov2e087942011-08-09 23:35:01 -0700388 }
389
390 // --------------------------------------------------------------------
391
392 /**
393 * Field data query
394 *
395 * Generates a platform-specific query so that the column data can be retrieved
396 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200397 * @param string $table
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200398 * @return string
Esen Sagynov2e087942011-08-09 23:35:01 -0700399 */
Andrey Andreev592f4ec2012-03-20 15:10:08 +0200400 protected function _field_data($table)
Esen Sagynov2e087942011-08-09 23:35:01 -0700401 {
Andrey Andreev7f55d612012-01-26 13:44:28 +0200402 return 'SELECT * FROM '.$table.' LIMIT 1';
Esen Sagynov2e087942011-08-09 23:35:01 -0700403 }
404
405 // --------------------------------------------------------------------
406
407 /**
Andrey Andreev4be5de12012-03-02 15:45:41 +0200408 * Error
Esen Sagynov2e087942011-08-09 23:35:01 -0700409 *
Andrey Andreev4be5de12012-03-02 15:45:41 +0200410 * Returns an array containing code and message of the last
411 * database error that has occured.
Esen Sagynov2e087942011-08-09 23:35:01 -0700412 *
Andrey Andreev4be5de12012-03-02 15:45:41 +0200413 * @return array
Esen Sagynov2e087942011-08-09 23:35:01 -0700414 */
Andrey Andreev4be5de12012-03-02 15:45:41 +0200415 public function error()
Esen Sagynov2e087942011-08-09 23:35:01 -0700416 {
Andrey Andreev4be5de12012-03-02 15:45:41 +0200417 return array('code' => cubrid_errno($this->conn_id), 'message' => cubrid_error($this->conn_id));
Esen Sagynov2e087942011-08-09 23:35:01 -0700418 }
419
Esen Sagynov2e087942011-08-09 23:35:01 -0700420 // --------------------------------------------------------------------
421
422 /**
Esen Sagynov2e087942011-08-09 23:35:01 -0700423 * Update_Batch statement
424 *
425 * Generates a platform-specific batch update string from the supplied data
426 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200427 * @param string $table Table name
428 * @param array $values Update data
429 * @param string $index WHERE key
Esen Sagynov2e087942011-08-09 23:35:01 -0700430 * @return string
431 */
Andrey Andreevb0478652012-07-18 15:34:46 +0300432 protected function _update_batch($table, $values, $index)
Esen Sagynov2e087942011-08-09 23:35:01 -0700433 {
434 $ids = array();
Esen Sagynov2e087942011-08-09 23:35:01 -0700435 foreach ($values as $key => $val)
436 {
437 $ids[] = $val[$index];
438
439 foreach (array_keys($val) as $field)
440 {
Alex Bilbie48a2baf2012-06-02 11:09:54 +0100441 if ($field !== $index)
Esen Sagynov2e087942011-08-09 23:35:01 -0700442 {
Esen Sagynov2ab2b1e2011-08-11 00:41:16 -0700443 $final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
Esen Sagynov2e087942011-08-09 23:35:01 -0700444 }
445 }
446 }
447
Esen Sagynov2e087942011-08-09 23:35:01 -0700448 $cases = '';
Esen Sagynov2e087942011-08-09 23:35:01 -0700449 foreach ($final as $k => $v)
450 {
Andrey Andreev7f55d612012-01-26 13:44:28 +0200451 $cases .= $k." = CASE \n"
452 .implode("\n", $v)
453 .'ELSE '.$k.' END, ';
Esen Sagynov2e087942011-08-09 23:35:01 -0700454 }
455
Andrey Andreevb0478652012-07-18 15:34:46 +0300456 $this->where($index.' IN('.implode(',', $ids).')', NULL, FALSE);
457
Andrey Andreevd40459d2012-07-18 16:46:39 +0300458 return 'UPDATE '.$table.' SET '.substr($cases, 0, -2).$this->_compile_wh('qb_where');
Esen Sagynov2e087942011-08-09 23:35:01 -0700459 }
460
461 // --------------------------------------------------------------------
Andrey Andreev79922c02012-05-23 12:27:17 +0300462
Esen Sagynov2e087942011-08-09 23:35:01 -0700463 /**
Andrey Andreev7eaa14f2012-10-09 11:34:01 +0300464 * FROM tables
465 *
466 * Groups tables in FROM clauses if needed, so there is no confusion
467 * about operator precedence.
468 *
469 * @return string
470 */
471 protected function _from_tables()
472 {
Andrey Andreevfce9abe2012-10-09 11:37:00 +0300473 if ( ! empty($this->qb_join) && count($this->qb_from) > 1)
Andrey Andreev7eaa14f2012-10-09 11:34:01 +0300474 {
475 return '('.implode(', ', $this->qb_from).')';
476 }
477
478 return implode(', ', $this->qb_from);
479 }
480
481 // --------------------------------------------------------------------
482
483 /**
Esen Sagynov2e087942011-08-09 23:35:01 -0700484 * Close DB Connection
485 *
Esen Sagynov2e087942011-08-09 23:35:01 -0700486 * @return void
487 */
Andrey Andreev79922c02012-05-23 12:27:17 +0300488 protected function _close()
Esen Sagynov2e087942011-08-09 23:35:01 -0700489 {
Andrey Andreev79922c02012-05-23 12:27:17 +0300490 @cubrid_close($this->conn_id);
Esen Sagynov2e087942011-08-09 23:35:01 -0700491 }
492
493}
494
Esen Sagynov2e087942011-08-09 23:35:01 -0700495/* End of file cubrid_driver.php */
Andrey Andreev79922c02012-05-23 12:27:17 +0300496/* Location: ./system/database/drivers/cubrid/cubrid_driver.php */