FIX Reset query generator after iteration is complete

This commit is contained in:
Guy Sartorelli 2022-09-15 16:24:08 +12:00
parent c529b8375c
commit 48d220101a
No known key found for this signature in database
GPG Key ID: F313E3B9504D496A
1 changed files with 2 additions and 0 deletions

View File

@ -62,6 +62,8 @@ class PostgreSQLQuery extends Query
while ($row = pg_fetch_array($this->handle, null, PGSQL_NUM)) {
yield $this->parseResult($row);
}
// Reset so the query can be iterated over again
pg_result_seek($this->handle, 0);
}
public function numRecords()