Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-228

OCI8Statement' fetchAll method can not do with PDO::FETCH_BOTH

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.2
    • Component/s: Drivers
    • Security Level: All
    • 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!!!!

        Activity

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            zhouhero
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: