blob: fd866ffd17be0dc3f18ef1044813454b46ac3479 [file] [log] [blame]
Andrey Andreevc5536aa2012-11-01 17:33:58 +02001<?php
Timothy Warren76e04352012-02-14 11:55:17 -05002/**
3 * CodeIgniter
4 *
Andrey Andreevfe9309d2015-01-09 17:48:58 +02005 * An open source application development framework for PHP
Timothy Warren76e04352012-02-14 11:55:17 -05006 *
Andrey Andreevbdb96ca2014-10-28 00:13:31 +02007 * This content is released under the MIT License (MIT)
Timothy Warren817af192012-02-16 08:28:00 -05008 *
Andrey Andreevcce6bd12018-01-09 11:32:02 +02009 * Copyright (c) 2014 - 2018, British Columbia Institute of Technology
Timothy Warren817af192012-02-16 08:28:00 -050010 *
Andrey Andreevbdb96ca2014-10-28 00:13:31 +020011 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
Timothy Warren76e04352012-02-14 11:55:17 -050017 *
Andrey Andreevbdb96ca2014-10-28 00:13:31 +020018 * The above copyright notice and this permission notice shall be included in
19 * all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 * THE SOFTWARE.
28 *
29 * @package CodeIgniter
30 * @author EllisLab Dev Team
Andrey Andreev1924e872016-01-11 12:55:34 +020031 * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
Andrey Andreevcce6bd12018-01-09 11:32:02 +020032 * @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
Andrey Andreevbdb96ca2014-10-28 00:13:31 +020033 * @license http://opensource.org/licenses/MIT MIT License
Andrey Andreevbd202c92016-01-11 12:50:18 +020034 * @link https://codeigniter.com
Andrey Andreevbdb96ca2014-10-28 00:13:31 +020035 * @since Version 3.0.0
Timothy Warren7221f942012-02-14 15:02:33 -050036 * @filesource
Timothy Warren76e04352012-02-14 11:55:17 -050037 */
Andrey Andreevc5536aa2012-11-01 17:33:58 +020038defined('BASEPATH') OR exit('No direct script access allowed');
Timothy Warren76e04352012-02-14 11:55:17 -050039
Timothy Warren76e04352012-02-14 11:55:17 -050040/**
41 * Firebird/Interbase Database Adapter Class
42 *
43 * Note: _DB is an extender class that the app controller
Jamie Rumbelowffe7a0a2012-04-26 13:48:18 +010044 * creates dynamically based on whether the query builder
Timothy Warren76e04352012-02-14 11:55:17 -050045 * class is being used or not.
46 *
Timothy Warren7221f942012-02-14 15:02:33 -050047 * @package CodeIgniter
48 * @subpackage Drivers
49 * @category Database
50 * @author EllisLab Dev Team
Andrey Andreevbd202c92016-01-11 12:50:18 +020051 * @link https://codeigniter.com/user_guide/database/
Timothy Warren76e04352012-02-14 11:55:17 -050052 */
Andrey Andreev26086872012-07-05 11:21:58 +030053class CI_DB_ibase_driver extends CI_DB {
Timothy Warren76e04352012-02-14 11:55:17 -050054
Andrey Andreeva24e52e2012-11-02 03:54:12 +020055 /**
56 * Database driver
57 *
58 * @var string
59 */
Andrey Andreev26086872012-07-05 11:21:58 +030060 public $dbdriver = 'ibase';
Timothy Warren76e04352012-02-14 11:55:17 -050061
Andrey Andreeva24e52e2012-11-02 03:54:12 +020062 // --------------------------------------------------------------------
Timothy Warren76e04352012-02-14 11:55:17 -050063
Andrey Andreeva24e52e2012-11-02 03:54:12 +020064 /**
65 * ORDER BY random keyword
66 *
Andrey Andreev98e46cf2012-11-13 03:01:42 +020067 * @var array
Andrey Andreeva24e52e2012-11-02 03:54:12 +020068 */
Andrey Andreev98e46cf2012-11-13 03:01:42 +020069 protected $_random_keyword = array('RAND()', 'RAND()');
Andrey Andreev00df2e32012-03-02 18:37:16 +020070
Andrey Andreeva24e52e2012-11-02 03:54:12 +020071 /**
72 * IBase Transaction status flag
73 *
74 * @var resource
75 */
76 protected $_ibase_trans;
77
78 // --------------------------------------------------------------------
Timothy Warren76e04352012-02-14 11:55:17 -050079
80 /**
81 * Non-persistent database connection
82 *
Andrey Andreev2e171022014-02-25 15:21:41 +020083 * @param bool $persistent
Timothy Warren7221f942012-02-14 15:02:33 -050084 * @return resource
Timothy Warren76e04352012-02-14 11:55:17 -050085 */
Andrey Andreev2e171022014-02-25 15:21:41 +020086 public function db_connect($persistent = FALSE)
Timothy Warren76e04352012-02-14 11:55:17 -050087 {
Andrey Andreev2e171022014-02-25 15:21:41 +020088 return ($persistent === TRUE)
Andrey Andreevf2818bd2014-02-25 15:26:20 +020089 ? ibase_pconnect($this->hostname.':'.$this->database, $this->username, $this->password, $this->char_set)
90 : ibase_connect($this->hostname.':'.$this->database, $this->username, $this->password, $this->char_set);
Timothy Warren76e04352012-02-14 11:55:17 -050091 }
92
93 // --------------------------------------------------------------------
94
95 /**
Andrey Andreev08856b82012-03-03 03:19:28 +020096 * Database version number
Timothy Warren76e04352012-02-14 11:55:17 -050097 *
Timothy Warren7221f942012-02-14 15:02:33 -050098 * @return string
Timothy Warren76e04352012-02-14 11:55:17 -050099 */
Andrey Andreev08856b82012-03-03 03:19:28 +0200100 public function version()
Timothy Warren76e04352012-02-14 11:55:17 -0500101 {
Andrey Andreev08856b82012-03-03 03:19:28 +0200102 if (isset($this->data_cache['version']))
103 {
104 return $this->data_cache['version'];
105 }
106
Timothy Warren3d985a12012-02-15 11:38:00 -0500107 if (($service = ibase_service_attach($this->hostname, $this->username, $this->password)))
108 {
Andrey Andreev08856b82012-03-03 03:19:28 +0200109 $this->data_cache['version'] = ibase_server_info($service, IBASE_SVC_SERVER_VERSION);
Andrey Andreev00df2e32012-03-02 18:37:16 +0200110
Timothy Warrenab189e12012-02-22 10:34:23 -0500111 // Don't keep the service open
112 ibase_service_detach($service);
Andrey Andreev08856b82012-03-03 03:19:28 +0200113 return $this->data_cache['version'];
Timothy Warren3d985a12012-02-15 11:38:00 -0500114 }
Andrey Andreev00df2e32012-03-02 18:37:16 +0200115
Timothy Warren3d985a12012-02-15 11:38:00 -0500116 return FALSE;
Timothy Warren76e04352012-02-14 11:55:17 -0500117 }
118
119 // --------------------------------------------------------------------
120
121 /**
122 * Execute the query
123 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200124 * @param string $sql an SQL query
Timothy Warren7221f942012-02-14 15:02:33 -0500125 * @return resource
Timothy Warren76e04352012-02-14 11:55:17 -0500126 */
Timothy Warren95562142012-02-20 17:37:21 -0500127 protected function _execute($sql)
Timothy Warren76e04352012-02-14 11:55:17 -0500128 {
Andrey Andreev8108b612016-03-07 10:10:17 +0200129 return ibase_query(isset($this->_ibase_trans) ? $this->_ibase_trans : $this->conn_id, $sql);
Timothy Warren76e04352012-02-14 11:55:17 -0500130 }
131
132 // --------------------------------------------------------------------
133
134 /**
Timothy Warren76e04352012-02-14 11:55:17 -0500135 * Begin Transaction
136 *
Timothy Warren7221f942012-02-14 15:02:33 -0500137 * @return bool
Timothy Warren76e04352012-02-14 11:55:17 -0500138 */
Andrey Andreeva7d4aba2015-10-19 14:39:44 +0300139 protected function _trans_begin()
Timothy Warren76e04352012-02-14 11:55:17 -0500140 {
Andrey Andreeva7d4aba2015-10-19 14:39:44 +0300141 if (($trans_handle = ibase_trans($this->conn_id)) === FALSE)
Timothy Warren76e04352012-02-14 11:55:17 -0500142 {
Andrey Andreeva7d4aba2015-10-19 14:39:44 +0300143 return FALSE;
Timothy Warren76e04352012-02-14 11:55:17 -0500144 }
145
Andrey Andreeva7d4aba2015-10-19 14:39:44 +0300146 $this->_ibase_trans = $trans_handle;
Timothy Warren76e04352012-02-14 11:55:17 -0500147 return TRUE;
148 }
149
150 // --------------------------------------------------------------------
151
152 /**
153 * Commit Transaction
154 *
Timothy Warren7221f942012-02-14 15:02:33 -0500155 * @return bool
Timothy Warren76e04352012-02-14 11:55:17 -0500156 */
Andrey Andreeva7d4aba2015-10-19 14:39:44 +0300157 protected function _trans_commit()
Timothy Warren76e04352012-02-14 11:55:17 -0500158 {
Andrey Andreeva7d4aba2015-10-19 14:39:44 +0300159 if (ibase_commit($this->_ibase_trans))
Timothy Warren76e04352012-02-14 11:55:17 -0500160 {
Andrey Andreeva7d4aba2015-10-19 14:39:44 +0300161 $this->_ibase_trans = NULL;
Timothy Warren76e04352012-02-14 11:55:17 -0500162 return TRUE;
163 }
Andrey Andreev00df2e32012-03-02 18:37:16 +0200164
Andrey Andreeva7d4aba2015-10-19 14:39:44 +0300165 return FALSE;
Timothy Warren76e04352012-02-14 11:55:17 -0500166 }
167
168 // --------------------------------------------------------------------
169
170 /**
171 * Rollback Transaction
172 *
Timothy Warren7221f942012-02-14 15:02:33 -0500173 * @return bool
Timothy Warren76e04352012-02-14 11:55:17 -0500174 */
Andrey Andreeva7d4aba2015-10-19 14:39:44 +0300175 protected function _trans_rollback()
Timothy Warren76e04352012-02-14 11:55:17 -0500176 {
Andrey Andreeva7d4aba2015-10-19 14:39:44 +0300177 if (ibase_rollback($this->_ibase_trans))
Timothy Warren76e04352012-02-14 11:55:17 -0500178 {
Andrey Andreeva7d4aba2015-10-19 14:39:44 +0300179 $this->_ibase_trans = NULL;
Timothy Warren76e04352012-02-14 11:55:17 -0500180 return TRUE;
181 }
182
Andrey Andreeva7d4aba2015-10-19 14:39:44 +0300183 return FALSE;
Timothy Warren76e04352012-02-14 11:55:17 -0500184 }
185
186 // --------------------------------------------------------------------
187
188 /**
Timothy Warren76e04352012-02-14 11:55:17 -0500189 * Affected Rows
190 *
Andrey Andreev131772c2012-03-20 23:35:03 +0200191 * @return int
Timothy Warren76e04352012-02-14 11:55:17 -0500192 */
Timothy Warren4be822b2012-02-14 12:07:34 -0500193 public function affected_rows()
Timothy Warren76e04352012-02-14 11:55:17 -0500194 {
Andrey Andreev2bbbd1a2014-05-09 10:24:14 +0300195 return ibase_affected_rows($this->conn_id);
Timothy Warren76e04352012-02-14 11:55:17 -0500196 }
197
198 // --------------------------------------------------------------------
199
200 /**
201 * Insert ID
202 *
Andrey Andreev131772c2012-03-20 23:35:03 +0200203 * @param string $generator_name
204 * @param int $inc_by
205 * @return int
Timothy Warren76e04352012-02-14 11:55:17 -0500206 */
Andrey Andreev5382b1b2012-06-25 01:26:48 +0300207 public function insert_id($generator_name, $inc_by = 0)
Timothy Warren76e04352012-02-14 11:55:17 -0500208 {
Timothy Warren07b660b2012-02-20 13:23:06 -0500209 //If a generator hasn't been used before it will return 0
Timothy Warrenfed2d1d2012-02-20 15:42:45 -0500210 return ibase_gen_id('"'.$generator_name.'"', $inc_by);
Timothy Warren76e04352012-02-14 11:55:17 -0500211 }
212
213 // --------------------------------------------------------------------
214
215 /**
Timothy Warren76e04352012-02-14 11:55:17 -0500216 * List table query
217 *
218 * Generates a platform-specific query string so that the table names can be fetched
219 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200220 * @param bool $prefix_limit
Timothy Warren7221f942012-02-14 15:02:33 -0500221 * @return string
Timothy Warren76e04352012-02-14 11:55:17 -0500222 */
Timothy Warren95562142012-02-20 17:37:21 -0500223 protected function _list_tables($prefix_limit = FALSE)
Timothy Warren76e04352012-02-14 11:55:17 -0500224 {
hArpanet516f59c2014-08-26 09:46:52 +0100225 $sql = 'SELECT TRIM("RDB$RELATION_NAME") AS TABLE_NAME FROM "RDB$RELATIONS" WHERE "RDB$RELATION_NAME" NOT LIKE \'RDB$%\' AND "RDB$RELATION_NAME" NOT LIKE \'MON$%\'';
Timothy Warren76e04352012-02-14 11:55:17 -0500226
Alex Bilbie48a2baf2012-06-02 11:09:54 +0100227 if ($prefix_limit !== FALSE && $this->dbprefix !== '')
Timothy Warren76e04352012-02-14 11:55:17 -0500228 {
hArpanet516f59c2014-08-26 09:46:52 +0100229 return $sql.' AND TRIM("RDB$RELATION_NAME") AS TABLE_NAME LIKE \''.$this->escape_like_str($this->dbprefix)."%' "
Andrey Andreev5382b1b2012-06-25 01:26:48 +0300230 .sprintf($this->_like_escape_str, $this->_like_escape_chr);
Timothy Warren76e04352012-02-14 11:55:17 -0500231 }
Andrey Andreev131772c2012-03-20 23:35:03 +0200232
Timothy Warren76e04352012-02-14 11:55:17 -0500233 return $sql;
234 }
235
236 // --------------------------------------------------------------------
237
238 /**
239 * Show column query
240 *
241 * Generates a platform-specific query string so that the column names can be fetched
242 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200243 * @param string $table
Timothy Warren7221f942012-02-14 15:02:33 -0500244 * @return string
Timothy Warren76e04352012-02-14 11:55:17 -0500245 */
Timothy Warren95562142012-02-20 17:37:21 -0500246 protected function _list_columns($table = '')
Timothy Warren76e04352012-02-14 11:55:17 -0500247 {
hArpanet516f59c2014-08-26 09:46:52 +0100248 return 'SELECT TRIM("RDB$FIELD_NAME") AS COLUMN_NAME FROM "RDB$RELATION_FIELDS" WHERE "RDB$RELATION_NAME" = '.$this->escape($table);
Timothy Warren76e04352012-02-14 11:55:17 -0500249 }
250
251 // --------------------------------------------------------------------
252
253 /**
Andrey Andreev02e7a9d2012-11-16 01:49:46 +0200254 * Returns an object with field data
Timothy Warren76e04352012-02-14 11:55:17 -0500255 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200256 * @param string $table
Andrey Andreev02e7a9d2012-11-16 01:49:46 +0200257 * @return array
Timothy Warren76e04352012-02-14 11:55:17 -0500258 */
Andrey Andreev5350f052015-01-12 12:33:37 +0200259 public function field_data($table)
Timothy Warren76e04352012-02-14 11:55:17 -0500260 {
Andrey Andreev02e7a9d2012-11-16 01:49:46 +0200261 $sql = 'SELECT "rfields"."RDB$FIELD_NAME" AS "name",
262 CASE "fields"."RDB$FIELD_TYPE"
263 WHEN 7 THEN \'SMALLINT\'
264 WHEN 8 THEN \'INTEGER\'
265 WHEN 9 THEN \'QUAD\'
266 WHEN 10 THEN \'FLOAT\'
267 WHEN 11 THEN \'DFLOAT\'
268 WHEN 12 THEN \'DATE\'
269 WHEN 13 THEN \'TIME\'
270 WHEN 14 THEN \'CHAR\'
271 WHEN 16 THEN \'INT64\'
272 WHEN 27 THEN \'DOUBLE\'
273 WHEN 35 THEN \'TIMESTAMP\'
274 WHEN 37 THEN \'VARCHAR\'
275 WHEN 40 THEN \'CSTRING\'
276 WHEN 261 THEN \'BLOB\'
277 ELSE NULL
278 END AS "type",
279 "fields"."RDB$FIELD_LENGTH" AS "max_length",
280 "rfields"."RDB$DEFAULT_VALUE" AS "default"
281 FROM "RDB$RELATION_FIELDS" "rfields"
282 JOIN "RDB$FIELDS" "fields" ON "rfields"."RDB$FIELD_SOURCE" = "fields"."RDB$FIELD_NAME"
283 WHERE "rfields"."RDB$RELATION_NAME" = '.$this->escape($table).'
284 ORDER BY "rfields"."RDB$FIELD_POSITION"';
285
286 return (($query = $this->query($sql)) !== FALSE)
287 ? $query->result_object()
288 : FALSE;
Timothy Warren76e04352012-02-14 11:55:17 -0500289 }
290
291 // --------------------------------------------------------------------
292
293 /**
Andrey Andreev00df2e32012-03-02 18:37:16 +0200294 * Error
Timothy Warren76e04352012-02-14 11:55:17 -0500295 *
Andrey Andreev00df2e32012-03-02 18:37:16 +0200296 * Returns an array containing code and message of the last
Andrey Andreev71d8f722017-01-17 12:01:00 +0200297 * database error that has occurred.
Timothy Warren76e04352012-02-14 11:55:17 -0500298 *
Andrey Andreev00df2e32012-03-02 18:37:16 +0200299 * @return array
Timothy Warren76e04352012-02-14 11:55:17 -0500300 */
Andrey Andreev00df2e32012-03-02 18:37:16 +0200301 public function error()
Timothy Warren76e04352012-02-14 11:55:17 -0500302 {
Andrey Andreev00df2e32012-03-02 18:37:16 +0200303 return array('code' => ibase_errcode(), 'message' => ibase_errmsg());
Timothy Warren76e04352012-02-14 11:55:17 -0500304 }
305
306 // --------------------------------------------------------------------
307
308 /**
Timothy Warren76e04352012-02-14 11:55:17 -0500309 * Update statement
310 *
311 * Generates a platform-specific update string from the supplied data
312 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200313 * @param string $table
314 * @param array $values
Timothy Warren7221f942012-02-14 15:02:33 -0500315 * @return string
Timothy Warren76e04352012-02-14 11:55:17 -0500316 */
Andrey Andreevb0478652012-07-18 15:34:46 +0300317 protected function _update($table, $values)
Timothy Warren76e04352012-02-14 11:55:17 -0500318 {
Andrey Andreevb0478652012-07-18 15:34:46 +0300319 $this->qb_limit = FALSE;
320 return parent::_update($table, $values);
Timothy Warren76e04352012-02-14 11:55:17 -0500321 }
322
Timothy Warren76e04352012-02-14 11:55:17 -0500323 // --------------------------------------------------------------------
324
325 /**
326 * Truncate statement
327 *
328 * Generates a platform-specific truncate string from the supplied data
Andrey Andreeva6fe36e2012-04-05 16:00:32 +0300329 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200330 * If the database does not support the TRUNCATE statement,
Andrey Andreeva6fe36e2012-04-05 16:00:32 +0300331 * then this method maps to 'DELETE FROM table'
Timothy Warren76e04352012-02-14 11:55:17 -0500332 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200333 * @param string $table
Timothy Warren7221f942012-02-14 15:02:33 -0500334 * @return string
Timothy Warren76e04352012-02-14 11:55:17 -0500335 */
Timothy Warren95562142012-02-20 17:37:21 -0500336 protected function _truncate($table)
Timothy Warren76e04352012-02-14 11:55:17 -0500337 {
Andrey Andreeva6fe36e2012-04-05 16:00:32 +0300338 return 'DELETE FROM '.$table;
Timothy Warren76e04352012-02-14 11:55:17 -0500339 }
340
341 // --------------------------------------------------------------------
342
343 /**
344 * Delete statement
345 *
346 * Generates a platform-specific delete string from the supplied data
347 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200348 * @param string $table
Timothy Warren7221f942012-02-14 15:02:33 -0500349 * @return string
Timothy Warren76e04352012-02-14 11:55:17 -0500350 */
Andrey Andreevb0478652012-07-18 15:34:46 +0300351 protected function _delete($table)
Timothy Warren76e04352012-02-14 11:55:17 -0500352 {
Andrey Andreevb0478652012-07-18 15:34:46 +0300353 $this->qb_limit = FALSE;
354 return parent::_delete($table);
Timothy Warren76e04352012-02-14 11:55:17 -0500355 }
356
357 // --------------------------------------------------------------------
358
359 /**
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200360 * LIMIT
Timothy Warren76e04352012-02-14 11:55:17 -0500361 *
362 * Generates a platform-specific LIMIT clause
363 *
Andrey Andreeva24e52e2012-11-02 03:54:12 +0200364 * @param string $sql SQL Query
Timothy Warren7221f942012-02-14 15:02:33 -0500365 * @return string
Timothy Warren76e04352012-02-14 11:55:17 -0500366 */
Andrey Andreevc9b924c2012-07-19 13:06:02 +0300367 protected function _limit($sql)
Timothy Warren76e04352012-02-14 11:55:17 -0500368 {
Timothy Warren56784f62012-02-29 11:58:20 -0500369 // Limit clause depends on if Interbase or Firebird
Andrey Andreev08856b82012-03-03 03:19:28 +0200370 if (stripos($this->version(), 'firebird') !== FALSE)
Timothy Warren56784f62012-02-29 11:58:20 -0500371 {
Andrey Andreevc9b924c2012-07-19 13:06:02 +0300372 $select = 'FIRST '.$this->qb_limit
373 .($this->qb_offset ? ' SKIP '.$this->qb_offset : '');
Timothy Warren56784f62012-02-29 11:58:20 -0500374 }
375 else
376 {
Andrey Andreev131772c2012-03-20 23:35:03 +0200377 $select = 'ROWS '
Andrey Andreevc9b924c2012-07-19 13:06:02 +0300378 .($this->qb_offset ? $this->qb_offset.' TO '.($this->qb_limit + $this->qb_offset) : $this->qb_limit);
Timothy Warren56784f62012-02-29 11:58:20 -0500379 }
Andrey Andreev00df2e32012-03-02 18:37:16 +0200380
Timothy Warrena5410872013-01-09 10:44:14 -0500381 return preg_replace('`SELECT`i', 'SELECT '.$select, $sql, 1);
Timothy Warren76e04352012-02-14 11:55:17 -0500382 }
383
384 // --------------------------------------------------------------------
385
386 /**
Andrey Andreev0a4dd842016-09-16 12:06:40 +0300387 * Insert batch statement
388 *
389 * Generates a platform-specific insert string from the supplied data.
390 *
391 * @param string $table Table name
392 * @param array $keys INSERT keys
393 * @param array $values INSERT values
394 * @return string|bool
395 */
396 protected function _insert_batch($table, $keys, $values)
397 {
Andrey Andreevea073522017-03-14 18:42:12 +0200398 return ($this->db_debug) ? $this->display_error('db_unsupported_feature') : FALSE;
Andrey Andreev0a4dd842016-09-16 12:06:40 +0300399 }
400
401 // --------------------------------------------------------------------
402
403 /**
Timothy Warren76e04352012-02-14 11:55:17 -0500404 * Close DB Connection
405 *
Timothy Warren7221f942012-02-14 15:02:33 -0500406 * @return void
Timothy Warren76e04352012-02-14 11:55:17 -0500407 */
Andrey Andreev79922c02012-05-23 12:27:17 +0300408 protected function _close()
Timothy Warren76e04352012-02-14 11:55:17 -0500409 {
Andrey Andreev2bbbd1a2014-05-09 10:24:14 +0300410 ibase_close($this->conn_id);
Timothy Warren76e04352012-02-14 11:55:17 -0500411 }
Andrey Andreev00df2e32012-03-02 18:37:16 +0200412
Timothy Warren76e04352012-02-14 11:55:17 -0500413}