mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-06-16 09:41:43 +02:00
FIX Reset query generator after iteration is complete (#139)
This commit is contained in:
parent
c529b8375c
commit
15d4e9550b
|
@ -62,6 +62,8 @@ class PostgreSQLQuery extends Query
|
||||||
while ($row = pg_fetch_array($this->handle, null, PGSQL_NUM)) {
|
while ($row = pg_fetch_array($this->handle, null, PGSQL_NUM)) {
|
||||||
yield $this->parseResult($row);
|
yield $this->parseResult($row);
|
||||||
}
|
}
|
||||||
|
// Reset so the query can be iterated over again
|
||||||
|
pg_result_seek($this->handle, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function numRecords()
|
public function numRecords()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user