Initial SQLite development #1

Merged
danieljsummers merged 25 commits from develop into main 2024-06-08 23:58:45 +00:00
Showing only changes of commit 4342d1ac50 - Show all commits

View File

@ -46,8 +46,15 @@ class DocumentList
*/ */
public function items(): Generator public function items(): Generator
{ {
$debug = defined('PDO_DOC_DEBUG_SQL');
if ($this->result) { if ($this->result) {
while ($row = $this->result->fetch(PDO::FETCH_ASSOC)) yield $this->mapper->map($row); while ($row = $this->result->fetch(PDO::FETCH_ASSOC)) {
if ($debug) echo "<pre>Returning an item\n</pre>";
yield $this->mapper->map($row);
}
} else {
if ($debug) echo 'Nothing to return';
} }
$this->result = null; $this->result = null;
$this->pdo = null; $this->pdo = null;