diff --git a/src/Bridge/Pdo/PdoQueryBuilder.php b/src/Bridge/Pdo/PdoQueryBuilder.php index 178218c..6b87a0b 100644 --- a/src/Bridge/Pdo/PdoQueryBuilder.php +++ b/src/Bridge/Pdo/PdoQueryBuilder.php @@ -120,7 +120,7 @@ protected function doExecuteQuery(string $expression, array $arguments = []): Re { $this->dieIfClosed(); - $statement = $this->connection->prepare($expression); + $statement = $this->connection->prepare($expression, [\PDO::ATTR_CURSOR => \PDO::CURSOR_FWDONLY]); $statement->execute($arguments); $result = new IterableResult( @@ -140,7 +140,7 @@ protected function doExecuteStatement(string $expression, array $arguments = []) { $this->dieIfClosed(); - $statement = $this->connection->prepare($expression); + $statement = $this->connection->prepare($expression, [\PDO::ATTR_CURSOR => \PDO::CURSOR_FWDONLY]); $statement->execute($arguments); return $statement->rowCount();