diff --git a/code/SQLite3Query.php b/code/SQLite3Query.php index e29a88d..82a5ac7 100644 --- a/code/SQLite3Query.php +++ b/code/SQLite3Query.php @@ -43,14 +43,11 @@ class SQLite3Query extends Query } } - public function seek($row) + public function getIterator() { - $this->handle->reset(); - $i=0; - while ($i <= $row && $result = @$this->handle->fetchArray(SQLITE3_ASSOC)) { - $i++; + while ($data = $this->handle->fetchArray(SQLITE3_ASSOC)) { + yield $data; } - return $result; } /** @@ -66,13 +63,4 @@ class SQLite3Query extends Query $this->handle->reset(); return $c; } - - public function nextRecord() - { - if ($data = $this->handle->fetchArray(SQLITE3_ASSOC)) { - return $data; - } else { - return false; - } - } }