From a119dc5082280113b033d8dab5c3a9af9f6ca8fb Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 19 Mar 2012 12:04:10 -0400 Subject: [PATCH] switch ibase_ methods to fbird_ methods --- sys/db/drivers/firebird-ibase.php | 44 +++++++++++++++--------------- tests/test_dbs/FB_TEST_DB.FDB | Bin 802816 -> 802816 bytes 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sys/db/drivers/firebird-ibase.php b/sys/db/drivers/firebird-ibase.php index 4f83df1..5f6b30e 100644 --- a/sys/db/drivers/firebird-ibase.php +++ b/sys/db/drivers/firebird-ibase.php @@ -15,7 +15,7 @@ /** * Firebird Database class * - * PDO-firebird isn't stable, so this is a wrapper of the ibase_ public functions. + * PDO-firebird isn't stable, so this is a wrapper of the fbird_ public functions. */ class firebird extends DB_PDO { @@ -30,12 +30,12 @@ class firebird extends DB_PDO { */ public function __construct($dbpath, $user='sysdba', $pass='masterkey') { - $this->conn = @ibase_connect($dbpath, $user, $pass, 'utf-8'); + $this->conn = @fbird_connect($dbpath, $user, $pass, 'utf-8'); // Throw an exception to make this match other pdo classes if ( ! is_resource($this->conn)) { - throw new PDOException(ibase_errmsg()); + throw new PDOException(fbird_errmsg()); die(); } @@ -50,8 +50,8 @@ class firebird extends DB_PDO { */ public function __destruct() { - @ibase_close(); - @ibase_free_result($this->statement); + @fbird_close(); + @fbird_free_result($this->statement); } // -------------------------------------------------------------------------- @@ -83,17 +83,17 @@ class firebird extends DB_PDO { if (isset($this->trans)) { - $this->statement_link = @ibase_query($this->trans, $sql); + $this->statement_link = @fbird_query($this->trans, $sql); } else { - $this->statement_link = @ibase_query($this->conn, $sql); + $this->statement_link = @fbird_query($this->conn, $sql); } // Throw the error as a exception if ($this->statement_link === FALSE) { - throw new PDOException(ibase_errmsg()); + throw new PDOException(fbird_errmsg()); } return new FireBird_Result($this->statement_link); @@ -111,12 +111,12 @@ class firebird extends DB_PDO { */ public function prepare($query, $options=NULL) { - $this->statement_link = @ibase_prepare($this->conn, $query); + $this->statement_link = @fbird_prepare($this->conn, $query); // Throw the error as an exception if ($this->statement_link === FALSE) { - throw new PDOException(ibase_errmsg()); + throw new PDOException(fbird_errmsg()); } return new FireBird_Result($this->statement_link); @@ -206,7 +206,7 @@ SQL; */ public function beginTransaction() { - if(($this->trans = ibase_trans($this->conn)) !== NULL) + if(($this->trans = fbird_trans($this->conn)) !== NULL) { return TRUE; } @@ -223,7 +223,7 @@ SQL; */ public function commit() { - return ibase_commit($this->trans); + return fbird_commit($this->trans); } // -------------------------------------------------------------------------- @@ -235,7 +235,7 @@ SQL; */ public function rollBack() { - return ibase_rollback($this->trans); + return fbird_rollback($this->trans); } @@ -286,8 +286,8 @@ SQL; */ public function errorInfo() { - $code = ibase_errcode(); - $msg = ibase_errmsg(); + $code = fbird_errcode(); + $msg = fbird_errmsg(); return array(0, $code, $msg); } @@ -430,15 +430,15 @@ class Firebird_Result { switch($fetch_style) { case PDO::FETCH_OBJ: - return ibase_fetch_object($this->statement, IBASE_FETCH_BLOBS); + return fbird_fetch_object($this->statement, IBASE_FETCH_BLOBS); break; case PDO::FETCH_NUM: - return ibase_fetch_row($this->statement, IBASE_FETCH_BLOBS); + return fbird_fetch_row($this->statement, IBASE_FETCH_BLOBS); break; default: - return ibase_fetch_assoc($this->statement, IBASE_FETCH_BLOBS); + return fbird_fetch_assoc($this->statement, IBASE_FETCH_BLOBS); break; } } @@ -480,7 +480,7 @@ class Firebird_Result { // Let php do all the hard stuff in converting // the array of arguments into a list of arguments - return new Firebird_Result(call_user_func_array('ibase_execute', $args)); + return new Firebird_Result(call_user_func_array('fbird_execute', $args)); } // -------------------------------------------------------------------------- @@ -492,7 +492,7 @@ class Firebird_Result { */ public function rowCount($statement="") { - return ibase_affected_rows(); + return fbird_affected_rows(); } // -------------------------------------------------------------------------- @@ -504,8 +504,8 @@ class Firebird_Result { */ public function errorInfo() { - $code = ibase_errcode(); - $msg = ibase_errmsg(); + $code = fbird_errcode(); + $msg = fbird_errmsg(); return array(0, $code, $msg); } diff --git a/tests/test_dbs/FB_TEST_DB.FDB b/tests/test_dbs/FB_TEST_DB.FDB index 3829b02045bc9c5df5b69b8e6c2f13ffd19530c1..15c398fa1f3492335b452953e961f6460bc38ad4 100755 GIT binary patch delta 550 zcmZ9H&ntvM7{{Myf8d=bjM{i}(EhN9Xy01DqKM;`T1kn+{vW6}Y3@>{IFZ7QmECd> z(fV<5cUtdWwCyfeH}k%`Lz!uw>C?=7p6}SUW!u&Q!eoMV!{6X!`y1r$cP2nVEdU=L zya6nYzxJ<&>K8cp)XaE*s@|EGkxaIIiwll|`vmt39uPbzc$47Gg0~26fgGI43b9N<6ff`wpkc5EDF;s1|c>8Uq%d`)cKmx zx08;`k54l58$~*8>2Oouc<&HUlGTtf;_8G7)|+7p(sAc%_2o)cZ~+| zUOpG8SAM@!Kizsi_at)2p-JneA@wOGcBuvpc3U7=NzLH#DCFc}Nr~I4N_-{X9ZF$V zMjYyqsS?Gl^M5+cTBlj-PF>xo9H~(!p18VtPCRy<^VZQnoo21mtabap>5{VS&>Zgl LWy?QRX=3pQQ}%i~ delta 586 zcmZvZ%P#{#9LIk%E!zINF$BwjY&9Miw269MoFt-&gb0rHe~@g1xx4rUb#M`J5Rat2 zIXQ6R;^MSzT~<88QM_ii9YoAz=9kaxH=mt{Z6|FzImuu+;k3X{6KDr2qYLXJMI$j9-_v-}5Z1h52ZQ&*M=8>}coORHLNWL&k{1kkJhd zs@_*(UY49EwDOA%?uF>8fI((Zp@?Y~p;!^yC|$yiWJn$9RAo6Z)d4hn^qaxwl#=e0 zFwH+rdMx1te>17Kgsn7M#QHJQ3wbKPzH>|NQrV{F=32v-aQmev9@C*jeX2r?