diff options
Diffstat (limited to 'libs/Zend/Db/Statement')
-rw-r--r-- | libs/Zend/Db/Statement/Db2.php | 28 | ||||
-rw-r--r-- | libs/Zend/Db/Statement/Db2/Exception.php | 8 | ||||
-rw-r--r-- | libs/Zend/Db/Statement/Exception.php | 31 | ||||
-rw-r--r-- | libs/Zend/Db/Statement/Interface.php | 6 | ||||
-rw-r--r-- | libs/Zend/Db/Statement/Mysqli.php | 32 | ||||
-rw-r--r-- | libs/Zend/Db/Statement/Mysqli/Exception.php | 8 | ||||
-rw-r--r-- | libs/Zend/Db/Statement/Oracle.php | 38 | ||||
-rw-r--r-- | libs/Zend/Db/Statement/Oracle/Exception.php | 8 | ||||
-rw-r--r-- | libs/Zend/Db/Statement/Pdo.php | 52 | ||||
-rw-r--r-- | libs/Zend/Db/Statement/Pdo/Ibm.php | 10 | ||||
-rw-r--r-- | libs/Zend/Db/Statement/Pdo/Oci.php | 30 | ||||
-rw-r--r-- | libs/Zend/Db/Statement/Sqlsrv.php | 25 | ||||
-rw-r--r-- | libs/Zend/Db/Statement/Sqlsrv/Exception.php | 8 |
13 files changed, 146 insertions, 138 deletions
diff --git a/libs/Zend/Db/Statement/Db2.php b/libs/Zend/Db/Statement/Db2.php index c2dac3a646..729d65c61a 100644 --- a/libs/Zend/Db/Statement/Db2.php +++ b/libs/Zend/Db/Statement/Db2.php @@ -15,22 +15,22 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Db2.php 17857 2009-08-27 22:01:47Z ralph $ + * @version $Id: Db2.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * @see Zend_Db_Statement */ -require_once 'Zend/Db/Statement.php'; +// require_once 'Zend/Db/Statement.php'; /** * Extends for DB2 native adapter. * * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Db2 extends Zend_Db_Statement @@ -65,7 +65,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement /** * @see Zend_Db_Statement_Db2_Exception */ - require_once 'Zend/Db/Statement/Db2/Exception.php'; + // require_once 'Zend/Db/Statement/Db2/Exception.php'; throw new Zend_Db_Statement_Db2_Exception( db2_stmt_errormsg(), db2_stmt_error() @@ -100,7 +100,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement /** * @see Zend_Db_Statement_Db2_Exception */ - require_once 'Zend/Db/Statement/Db2/Exception.php'; + // require_once 'Zend/Db/Statement/Db2/Exception.php'; throw new Zend_Db_Statement_Db2_Exception( db2_stmt_errormsg(), db2_stmt_error() @@ -154,7 +154,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement $error = db2_stmt_error(); if ($error === '') { - return false; + return false; } return $error; @@ -168,10 +168,10 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement */ public function errorInfo() { - $error = $this->errorCode(); - if ($error === false){ - return false; - } + $error = $this->errorCode(); + if ($error === false){ + return false; + } /* * Return three-valued array like PDO. But DB2 does not distinguish @@ -208,7 +208,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement /** * @see Zend_Db_Statement_Db2_Exception */ - require_once 'Zend/Db/Statement/Db2/Exception.php'; + // require_once 'Zend/Db/Statement/Db2/Exception.php'; throw new Zend_Db_Statement_Db2_Exception( db2_stmt_errormsg(), db2_stmt_error()); @@ -272,7 +272,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement /** * @see Zend_Db_Statement_Db2_Exception */ - require_once 'Zend/Db/Statement/Db2/Exception.php'; + // require_once 'Zend/Db/Statement/Db2/Exception.php'; throw new Zend_Db_Statement_Db2_Exception("Invalid fetch mode '$style' specified"); break; } @@ -306,7 +306,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement /** * @see Zend_Db_Statement_Db2_Exception */ - require_once 'Zend/Db/Statement/Db2/Exception.php'; + // require_once 'Zend/Db/Statement/Db2/Exception.php'; throw new Zend_Db_Statement_Db2_Exception(__FUNCTION__ . '() is not implemented'); } diff --git a/libs/Zend/Db/Statement/Db2/Exception.php b/libs/Zend/Db/Statement/Db2/Exception.php index 0b04bf4af2..d77b5d830c 100644 --- a/libs/Zend/Db/Statement/Db2/Exception.php +++ b/libs/Zend/Db/Statement/Db2/Exception.php @@ -15,20 +15,20 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $ + * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * Zend_Db_Statement_Exception */ -require_once 'Zend/Db/Statement/Exception.php'; +// require_once 'Zend/Db/Statement/Exception.php'; /** * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/libs/Zend/Db/Statement/Exception.php b/libs/Zend/Db/Statement/Exception.php index 7c9d58992a..511888a5e3 100644 --- a/libs/Zend/Db/Statement/Exception.php +++ b/libs/Zend/Db/Statement/Exception.php @@ -15,15 +15,15 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Exception.php 17860 2009-08-27 22:48:48Z beberlei $ + * @version $Id: Exception.php 20514 2010-01-22 07:57:10Z ralph $ */ /** * @see Zend_Db_Exception */ -require_once 'Zend/Db/Exception.php'; +// require_once 'Zend/Db/Exception.php'; /** * Zend_Db_Statement_Exception @@ -31,36 +31,19 @@ require_once 'Zend/Db/Exception.php'; * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Exception extends Zend_Db_Exception { /** - * @var Exception - */ - protected $_chainedException = null; - - /** - * @param string $message - * @param string|int $code - * @param Exception $chainedException - */ - public function __construct($message = null, $code = null, Exception $chainedException=null) - { - $this->message = $message; - $this->code = $code; - $this->_chainedException = $chainedException; - } - - /** * Check if this general exception has a specific database driver specific exception nested inside. - * + * * @return bool */ public function hasChainedException() { - return ($this->_chainedException!==null); + return ($this->getPrevious() !== null); } /** @@ -68,6 +51,6 @@ class Zend_Db_Statement_Exception extends Zend_Db_Exception */ public function getChainedException() { - return $this->_chainedException; + return $this->getPrevious(); } } diff --git a/libs/Zend/Db/Statement/Interface.php b/libs/Zend/Db/Statement/Interface.php index 2cf951b057..701c64010e 100644 --- a/libs/Zend/Db/Statement/Interface.php +++ b/libs/Zend/Db/Statement/Interface.php @@ -15,9 +15,9 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Interface.php 16541 2009-07-07 06:59:03Z bkarwin $ + * @version $Id: Interface.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Db_Statement_Interface diff --git a/libs/Zend/Db/Statement/Mysqli.php b/libs/Zend/Db/Statement/Mysqli.php index a1870f13fa..51dba7160f 100644 --- a/libs/Zend/Db/Statement/Mysqli.php +++ b/libs/Zend/Db/Statement/Mysqli.php @@ -15,25 +15,25 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Mysqli.php 18195 2009-09-17 20:58:05Z bittarman $ + * @version $Id: Mysqli.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * @see Zend_Db_Statement */ -require_once 'Zend/Db/Statement.php'; +// require_once 'Zend/Db/Statement.php'; + - /** * Extends for Mysqli * * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement @@ -73,7 +73,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement /** * @see Zend_Db_Statement_Mysqli_Exception */ - require_once 'Zend/Db/Statement/Mysqli/Exception.php'; + // require_once 'Zend/Db/Statement/Mysqli/Exception.php'; throw new Zend_Db_Statement_Mysqli_Exception("Mysqli prepare error: " . $mysqli->error, $mysqli->errno); } } @@ -210,7 +210,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement /** * @see Zend_Db_Statement_Mysqli_Exception */ - require_once 'Zend/Db/Statement/Mysqli/Exception.php'; + // require_once 'Zend/Db/Statement/Mysqli/Exception.php'; throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement execute error : " . $this->_stmt->error, $this->_stmt->errno); } @@ -222,7 +222,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement /** * @see Zend_Db_Statement_Mysqli_Exception */ - require_once 'Zend/Db/Statement/Mysqli/Exception.php'; + // require_once 'Zend/Db/Statement/Mysqli/Exception.php'; throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement metadata error: " . $this->_stmt->error, $this->_stmt->errno); } } @@ -275,12 +275,12 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement // fetch the next result $retval = $this->_stmt->fetch(); switch ($retval) { - case null: // end of data - case false: // error occurred - $this->_stmt->reset(); - return false; - default: - // fallthrough + case null: // end of data + case false: // error occurred + $this->_stmt->reset(); + return false; + default: + // fallthrough } // make sure we have a fetch mode @@ -319,7 +319,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement /** * @see Zend_Db_Statement_Mysqli_Exception */ - require_once 'Zend/Db/Statement/Mysqli/Exception.php'; + // require_once 'Zend/Db/Statement/Mysqli/Exception.php'; throw new Zend_Db_Statement_Mysqli_Exception("Invalid fetch mode '$style' specified"); break; } @@ -339,7 +339,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement /** * @see Zend_Db_Statement_Mysqli_Exception */ - require_once 'Zend/Db/Statement/Mysqli/Exception.php'; + // require_once 'Zend/Db/Statement/Mysqli/Exception.php'; throw new Zend_Db_Statement_Mysqli_Exception(__FUNCTION__.'() is not implemented'); } diff --git a/libs/Zend/Db/Statement/Mysqli/Exception.php b/libs/Zend/Db/Statement/Mysqli/Exception.php index a90162db02..4847231476 100644 --- a/libs/Zend/Db/Statement/Mysqli/Exception.php +++ b/libs/Zend/Db/Statement/Mysqli/Exception.php @@ -15,20 +15,20 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $ + * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * Zend_Db_Statement_Exception */ -require_once 'Zend/Db/Statement/Exception.php'; +// require_once 'Zend/Db/Statement/Exception.php'; /** * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/libs/Zend/Db/Statement/Oracle.php b/libs/Zend/Db/Statement/Oracle.php index 0c8c18a6bd..d84d2bab7f 100644 --- a/libs/Zend/Db/Statement/Oracle.php +++ b/libs/Zend/Db/Statement/Oracle.php @@ -15,15 +15,15 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Oracle.php 18636 2009-10-17 05:44:41Z ralph $ + * @version $Id: Oracle.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * @see Zend_Db_Statement */ -require_once 'Zend/Db/Statement.php'; +// require_once 'Zend/Db/Statement.php'; /** * Extends for Oracle. @@ -31,7 +31,7 @@ require_once 'Zend/Db/Statement.php'; * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Oracle extends Zend_Db_Statement @@ -92,7 +92,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Statement_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception(oci_error($connection)); } } @@ -125,7 +125,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt)); } @@ -249,7 +249,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt)); } } @@ -259,7 +259,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt)); } @@ -323,7 +323,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception( array( 'code' => 'HYC00', @@ -337,7 +337,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception($error); } @@ -374,7 +374,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception( array( 'code' => 'HYC00', @@ -402,7 +402,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception( array( 'code' => 'HYC00', @@ -419,7 +419,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception($error); } if (!$rows) { @@ -442,7 +442,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception($error); } } @@ -472,7 +472,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception($error); } @@ -481,7 +481,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt)); } @@ -516,7 +516,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception($error); } @@ -538,7 +538,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Statement_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception( array( 'code' => 'HYC00', @@ -567,7 +567,7 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement /** * @see Zend_Db_Adapter_Oracle_Exception */ - require_once 'Zend/Db/Statement/Oracle/Exception.php'; + // require_once 'Zend/Db/Statement/Oracle/Exception.php'; throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt)); } diff --git a/libs/Zend/Db/Statement/Oracle/Exception.php b/libs/Zend/Db/Statement/Oracle/Exception.php index 26f5412eef..d5e21bad3f 100644 --- a/libs/Zend/Db/Statement/Oracle/Exception.php +++ b/libs/Zend/Db/Statement/Oracle/Exception.php @@ -15,21 +15,21 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $ + * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * Zend_Db_Statement_Exception */ -require_once 'Zend/Db/Statement/Exception.php'; +// require_once 'Zend/Db/Statement/Exception.php'; /** * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/libs/Zend/Db/Statement/Pdo.php b/libs/Zend/Db/Statement/Pdo.php index c0f6bc5248..b9e9400d28 100644 --- a/libs/Zend/Db/Statement/Pdo.php +++ b/libs/Zend/Db/Statement/Pdo.php @@ -15,15 +15,15 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Pdo.php 18079 2009-09-11 17:46:45Z ralph $ + * @version $Id: Pdo.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * @see Zend_Db_Statement */ -require_once 'Zend/Db/Statement.php'; +// require_once 'Zend/Db/Statement.php'; /** * Proxy class to wrap a PDOStatement object. @@ -34,7 +34,7 @@ require_once 'Zend/Db/Statement.php'; * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggregate @@ -57,7 +57,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { $this->_stmt = $this->_adapter->getConnection()->prepare($sql); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -81,7 +81,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega return $this->_stmt->bindColumn($column, $param, $type); } } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -113,7 +113,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega } return $this->_stmt->bindParam($parameter, $variable, $type, $length, $options); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -132,9 +132,9 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega if (is_string($parameter) && $parameter[0] != ':') { $parameter = ":$parameter"; } - + $this->_bindParam[$parameter] = $value; - + try { if ($type === null) { return $this->_stmt->bindValue($parameter, $value); @@ -142,7 +142,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega return $this->_stmt->bindValue($parameter, $value, $type); } } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -158,7 +158,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->closeCursor(); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -175,7 +175,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->columnCount(); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -192,7 +192,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->errorCode(); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -209,7 +209,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->errorInfo(); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -230,8 +230,8 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega return $this->_stmt->execute(); } } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; - throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); + // require_once 'Zend/Db/Statement/Exception.php'; + throw new Zend_Db_Statement_Exception($e->getMessage(), (int) $e->getCode(), $e); } } @@ -252,7 +252,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->fetch($style, $cursor, $offset); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -290,7 +290,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega return $this->_stmt->fetchAll($style); } } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -307,7 +307,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->fetchColumn($col); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -325,7 +325,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->fetchObject($class, $config); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -342,7 +342,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->getAttribute($key); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -359,7 +359,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->getColumnMeta($column); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -377,7 +377,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->nextRowset(); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -395,7 +395,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->rowCount(); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -413,7 +413,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->setAttribute($key, $val); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -431,7 +431,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega try { return $this->_stmt->setFetchMode($mode); } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } diff --git a/libs/Zend/Db/Statement/Pdo/Ibm.php b/libs/Zend/Db/Statement/Pdo/Ibm.php index 29ae3db62e..20b6aea7a9 100644 --- a/libs/Zend/Db/Statement/Pdo/Ibm.php +++ b/libs/Zend/Db/Statement/Pdo/Ibm.php @@ -15,15 +15,15 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Ibm.php 17860 2009-08-27 22:48:48Z beberlei $ + * @version $Id: Ibm.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * @see Zend_Db_Statement_Pdo */ -require_once 'Zend/Db/Statement/Pdo.php'; +// require_once 'Zend/Db/Statement/Pdo.php'; /** * Proxy class to wrap a PDOStatement object for IBM Databases. @@ -34,7 +34,7 @@ require_once 'Zend/Db/Statement/Pdo.php'; * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Pdo_Ibm extends Zend_Db_Statement_Pdo @@ -86,7 +86,7 @@ class Zend_Db_Statement_Pdo_Ibm extends Zend_Db_Statement_Pdo return $this->_stmt->bindParam($parameter, $variable, $type, $length, $options); } } catch (PDOException $e) { - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } diff --git a/libs/Zend/Db/Statement/Pdo/Oci.php b/libs/Zend/Db/Statement/Pdo/Oci.php index e4b1edc638..2306228187 100644 --- a/libs/Zend/Db/Statement/Pdo/Oci.php +++ b/libs/Zend/Db/Statement/Pdo/Oci.php @@ -15,15 +15,15 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Oci.php 16971 2009-07-22 18:05:45Z mikaelkael $ + * @version $Id: Oci.php 21105 2010-02-19 21:27:09Z mikaelkael $ */ /** * @see Zend_Db_Statement_Pdo */ -require_once 'Zend/Db/Statement/Pdo.php'; +// require_once 'Zend/Db/Statement/Pdo.php'; /** * Proxy class to wrap a PDOStatement object for IBM Databases. @@ -34,7 +34,7 @@ require_once 'Zend/Db/Statement/Pdo.php'; * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Pdo_Oci extends Zend_Db_Statement_Pdo @@ -66,4 +66,26 @@ class Zend_Db_Statement_Pdo_Oci extends Zend_Db_Statement_Pdo } return $results; } + + + /** + * Fetches a row from the result set. + * + * @param int $style OPTIONAL Fetch mode for this fetch operation. + * @param int $cursor OPTIONAL Absolute, relative, or other. + * @param int $offset OPTIONAL Number for absolute or relative cursors. + * @return mixed Array, object, or scalar depending on fetch mode. + * @throws Zend_Db_Statement_Exception + */ + public function fetch($style = null, $cursor = null, $offset = null) + { + $row = parent::fetch($style, $cursor, $offset); + + $remove = $this->_adapter->foldCase('zend_db_rownum'); + if (is_array($row) && array_key_exists($remove, $row)) { + unset($row[$remove]); + } + + return $row; + } }
\ No newline at end of file diff --git a/libs/Zend/Db/Statement/Sqlsrv.php b/libs/Zend/Db/Statement/Sqlsrv.php index 45c243edf1..9663c83ccf 100644 --- a/libs/Zend/Db/Statement/Sqlsrv.php +++ b/libs/Zend/Db/Statement/Sqlsrv.php @@ -15,14 +15,15 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id: Sqlsrv.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * @see Zend_Db_Statement */ -require_once 'Zend/Db/Statement.php'; +// require_once 'Zend/Db/Statement.php'; /** * Extends for Microsoft SQL Server Driver for PHP @@ -30,7 +31,7 @@ require_once 'Zend/Db/Statement.php'; * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement @@ -65,7 +66,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement $this->_stmt = sqlsrv_prepare($connection, $sql); if (!$this->_stmt) { - require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; + // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors()); } @@ -201,7 +202,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement $this->_stmt = sqlsrv_query($connection, $this->_originalSQL, $params); if (!$this->_stmt) { - require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; + // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors()); } @@ -232,7 +233,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement $values = sqlsrv_fetch_array($this->_stmt, SQLSRV_FETCH_ASSOC); if (!$values && (null !== $error = sqlsrv_errors())) { - require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; + // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; throw new Zend_Db_Statement_Sqlsrv_Exception($error); } @@ -269,7 +270,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement $row = $this->_fetchBound($row); break; default: - require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; + // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; throw new Zend_Db_Statement_Sqlsrv_Exception("Invalid fetch mode '$style' specified"); break; } @@ -292,7 +293,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement if (!sqlsrv_fetch($this->_stmt)) { if (null !== $error = sqlsrv_errors()) { - require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; + // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; throw new Zend_Db_Statement_Sqlsrv_Exception($error); } @@ -302,7 +303,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement $data = sqlsrv_get_field($this->_stmt, $col); //0-based if ($data === false) { - require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; + // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors()); } @@ -326,7 +327,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement $obj = sqlsrv_fetch_object($this->_stmt); if ($error = sqlsrv_errors()) { - require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; + // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; throw new Zend_Db_Statement_Sqlsrv_Exception($error); } @@ -372,7 +373,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement public function nextRowset() { if (sqlsrv_next_result($this->_stmt) === false) { - require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; + // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors()); } @@ -401,7 +402,7 @@ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement // Strict check is necessary; 0 is a valid return value if ($num_rows === false) { - require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; + // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php'; throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors()); } diff --git a/libs/Zend/Db/Statement/Sqlsrv/Exception.php b/libs/Zend/Db/Statement/Sqlsrv/Exception.php index 02378627f9..cbd4cf4d45 100644 --- a/libs/Zend/Db/Statement/Sqlsrv/Exception.php +++ b/libs/Zend/Db/Statement/Sqlsrv/Exception.php @@ -12,21 +12,23 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * + * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * @see Zend_Db_Statement_Exception */ -require_once 'Zend/Db/Statement/Exception.php'; +// require_once 'Zend/Db/Statement/Exception.php'; /** * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Sqlsrv_Exception extends Zend_Db_Statement_Exception |