[DBAL-228] OCI8Statement' fetchAll method can not do with PDO::FETCH_BOTH Created: 02/Mar/12  Updated: 14/Mar/12  Resolved: 14/Mar/12

Status: Resolved
Project: Doctrine DBAL
Component/s: Drivers
Affects Version/s: 2.2.1
Fix Version/s: 2.2.2
Security Level: All

Type: Bug Priority: Critical
Reporter: zhouhero Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

/**

  • {@inheritdoc}

    */

private static $fetchStyleMap = array(
PDO::FETCH_BOTH => OCI_BOTH,
PDO::FETCH_ASSOC => OCI_ASSOC,
PDO::FETCH_NUM => OCI_NUM
);

public function fetchAll($fetchStyle = PDO::FETCH_BOTH)
{
if ( ! isset(self::$fetchStyleMap[$fetchStyle]))

{ throw new \InvalidArgumentException("Invalid fetch style: " . $fetchStyle); }

$result = array();
oci_fetch_all($this->_sth, $result, 0, -1,
self::$fetchStyleMap[$fetchStyle] | OCI_RETURN_NULLS | OCI_FETCHSTATEMENT_BY_ROW | OCI_RETURN_LOBS);

return $result;
}

oci_fetch_all method can only surport

  • OCI_NUM
  • OCI_ASSOC

in $fetchStyleMap, OCI_BOTH is included!!!!



 Comments   
Comment by Benjamin Eberlei [ 14/Mar/12 ]

Fixed

Generated at Sun Dec 21 13:33:35 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.