Skip to content

Commit

Permalink
issue #2 - PDO cursor forward only per default
Browse files Browse the repository at this point in the history
  • Loading branch information
pounard committed Mar 1, 2024
1 parent 247f9bf commit bf03779
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bridge/Pdo/PdoQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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();
Expand Down

0 comments on commit bf03779

Please sign in to comment.