FIX Reset query generator after iteration is complete (#139)

This commit is contained in:
Guy Sartorelli 2022-09-15 16:32:43 +12:00 committed by GitHub
parent c529b8375c
commit 15d4e9550b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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()