// Initialize the first row in $this->currentRow.
$this->
next();
return $return;
} /**
* Throw a PDO Exception based on the last PDO error.
*/
protected function throwPDOException() { $error_info =
$this->connection->
errorInfo();
// We rebuild a message formatted in the same way as PDO.
$exception =
new \
PDOException("SQLSTATE[" .
$error_info[0
] . "]: General error " .
$error_info[1
] . ": " .
$error_info[2
]);
$exception->errorInfo =
$error_info;
throw $exception;
} /**
* Grab a PDOStatement object from a given query and its arguments.
*
* Some drivers (including SQLite) will need to perform some preparation
* themselves to get the statement right.
*
* @param $query
* The query.
* @param array|null $args
* An array of arguments. This can be NULL.
*
* @return \PDOStatement
* A PDOStatement object.
*/