mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 17:05:45 +02:00
Merge pull request #111 from dhensby/pulls/3/seek-before-iterate
FIX Allow repeat calls to `getIterator()`
This commit is contained in:
commit
e18651cd33
@ -58,6 +58,7 @@ class PostgreSQLQuery extends Query
|
||||
|
||||
public function getIterator()
|
||||
{
|
||||
pg_result_seek($this->handle, 0);
|
||||
while ($data = $this->nextRecord()) {
|
||||
yield $data;
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"ext-pgsql": "*",
|
||||
"silverstripe/framework": "^5",
|
||||
"silverstripe/vendor-plugin": "^1.0"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user