/**
  * Prepares a PL/SQL statement to be executed.
  *
  * @param string $sql The PL/SQL to convert into a prepared statement.
  * @param array $options Method options used on method constructing.
  * @return StatementInterface
  */
 public function prepareMethod($sql, $options = [])
 {
     if (!method_exists($this->_driver, 'isOci') || !$this->_driver->isOci()) {
         throw new Exception('Method calls using PDO layer not supported');
     }
     $options += ['bufferResult' => false];
     $statement = $this->_driver->prepareMethod($sql, $options);
     $this->_logQueries = true;
     if ($this->_logQueries) {
         $statement = $this->_getMethodLogger($statement);
     }
     return $statement;
 }
예제 #2
0
 /**
  * @inheritdoc
  */
 protected function _connect($database, array $config)
 {
     $database = 'oci:dbname=' . $database;
     parent::_connect($database, $config);
 }