/** * Prepares an SQL statement. * * @param string $statement The SQL statement to prepare. * @return \Doctrine\DBAL\Driver\Statement The prepared statement. */ public function prepare($statement) { $this->connect(); $stmt = new Statement($statement, $this); $stmt->setFetchMode($this->_defaultFetchMode); return $stmt; }
/** * Prepares an SQL statement. * * @param string $statement The SQL statement to prepare. * * @return \Doctrine\DBAL\Driver\Statement The prepared statement. * * @throws \Doctrine\DBAL\DBALException */ public function prepare($statement) { $this->connect(); try { $stmt = new Statement($statement, $this); } catch (\Exception $ex) { throw DBALException::driverExceptionDuringQuery($ex, $statement); } $stmt->setFetchMode($this->defaultFetchMode); return $stmt; }
/** * @param $fetchMode * @param null $arg2 * @param null $arg3 * @return mixed */ public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) { return $this->stmt->setFetchMode($fetchMode, $arg2, $arg3); }