diff options
author | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2010-06-23 07:02:26 +0400 |
---|---|---|
committer | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2010-06-23 07:02:26 +0400 |
commit | 999f46479294713104c962bfe7469e9b6e7a4bbf (patch) | |
tree | a22e349d850bc2f2946a85a3cab373c4b6dc1809 /libs/Zend/Db/Statement | |
parent | 462d78c290f19dd691d9634bf2b17d2adc4446af (diff) | |
parent | c0b42ff664a0846064df23db232ea774931ab7a3 (diff) |
0.6.3?
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, 138 insertions, 146 deletions
diff --git a/libs/Zend/Db/Statement/Db2.php b/libs/Zend/Db/Statement/Db2.php index 729d65c61a..c2dac3a646 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Db2.php 20096 2010-01-06 02:05:09Z bkarwin $ + * @version $Id: Db2.php 17857 2009-08-27 22:01:47Z ralph $ */ /** * @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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 d77b5d830c..0b04bf4af2 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 $ + * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 511888a5e3..7c9d58992a 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Exception.php 20514 2010-01-22 07:57:10Z ralph $ + * @version $Id: Exception.php 17860 2009-08-27 22:48:48Z beberlei $ */ /** * @see Zend_Db_Exception */ -// require_once 'Zend/Db/Exception.php'; +require_once 'Zend/Db/Exception.php'; /** * Zend_Db_Statement_Exception @@ -31,19 +31,36 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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->getPrevious() !== null); + return ($this->_chainedException!==null); } /** @@ -51,6 +68,6 @@ class Zend_Db_Statement_Exception extends Zend_Db_Exception */ public function getChainedException() { - return $this->getPrevious(); + return $this->_chainedException; } } diff --git a/libs/Zend/Db/Statement/Interface.php b/libs/Zend/Db/Statement/Interface.php index 701c64010e..2cf951b057 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Interface.php 20096 2010-01-06 02:05:09Z bkarwin $ + * @version $Id: Interface.php 16541 2009-07-07 06:59:03Z bkarwin $ */ /** @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 51dba7160f..a1870f13fa 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Mysqli.php 20096 2010-01-06 02:05:09Z bkarwin $ + * @version $Id: Mysqli.php 18195 2009-09-17 20:58:05Z bittarman $ */ /** * @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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 4847231476..a90162db02 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 $ + * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 d84d2bab7f..0c8c18a6bd 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Oracle.php 20096 2010-01-06 02:05:09Z bkarwin $ + * @version $Id: Oracle.php 18636 2009-10-17 05:44:41Z ralph $ */ /** * @see Zend_Db_Statement */ -// require_once 'Zend/Db/Statement.php'; +require_once 'Zend/Db/Statement.php'; /** * Extends for Oracle. @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 d5e21bad3f..26f5412eef 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 $ + * @version $Id: Exception.php 16541 2009-07-07 06:59:03Z 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 b9e9400d28..c0f6bc5248 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Pdo.php 20096 2010-01-06 02:05:09Z bkarwin $ + * @version $Id: Pdo.php 18079 2009-09-11 17:46:45Z ralph $ */ /** * @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 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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(), (int) $e->getCode(), $e); + require_once 'Zend/Db/Statement/Exception.php'; + throw new Zend_Db_Statement_Exception($e->getMessage(), $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 20b6aea7a9..29ae3db62e 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Ibm.php 20096 2010-01-06 02:05:09Z bkarwin $ + * @version $Id: Ibm.php 17860 2009-08-27 22:48:48Z beberlei $ */ /** * @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 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 2306228187..e4b1edc638 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Oci.php 21105 2010-02-19 21:27:09Z mikaelkael $ + * @version $Id: Oci.php 16971 2009-07-22 18:05:45Z 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 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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,26 +66,4 @@ 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 9663c83ccf..45c243edf1 100644 --- a/libs/Zend/Db/Statement/Sqlsrv.php +++ b/libs/Zend/Db/Statement/Sqlsrv.php @@ -15,15 +15,14 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 @@ -31,7 +30,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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 @@ -66,7 +65,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()); } @@ -202,7 +201,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()); } @@ -233,7 +232,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); } @@ -270,7 +269,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; } @@ -293,7 +292,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); } @@ -303,7 +302,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()); } @@ -327,7 +326,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); } @@ -373,7 +372,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()); } @@ -402,7 +401,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 cbd4cf4d45..02378627f9 100644 --- a/libs/Zend/Db/Statement/Sqlsrv/Exception.php +++ b/libs/Zend/Db/Statement/Sqlsrv/Exception.php @@ -12,23 +12,21 @@ * 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 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-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2008 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 |