Skip to content

Commit 4a3cf57

Browse files
committed
Fix for large iterator
1 parent 499ad05 commit 4a3cf57

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Driver/Pdo/PdoMysqlConnection.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,15 @@ public static function getParameters(array $options): array
2727
$options['driverOptions'][\PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES utf8';
2828
}
2929

30-
$options['driverOptions'][\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY] = false;
31-
3230
return $options;
3331
}
32+
33+
public function disableBufferedQuery(bool $buffered = true): static
34+
{
35+
$pdo = $this->get();
36+
37+
$pdo?->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, !$buffered);
38+
39+
return $this;
40+
}
3441
}

0 commit comments

Comments
 (0)