7#ifndef _litesql_cursor_hpp
8#define _litesql_cursor_hpp
43 std::vector<T>
dump();
51Cursor<T>::Cursor(
const Database& db_, Backend::Cursor * c)
52 : db(db_), cursor(c), done(false), dataReady(false) {
63 currentRow = cursor->fetchOne();
64 if (currentRow.size() == 0) {
78 res.push_back(
operator*());
88 return T(db,currentRow);
Classes Backend, Backend::Cursor and Backend::Result.
An abstract base class for cursors that iterate result sets returned by relational database.
Definition backend.hpp:23
bool rowsLeft()
returns true if there are records left in the result set
Definition cursor.hpp:47
~Cursor()
deletes Backend::Cursor
Definition cursor.hpp:56
Cursor< T > & operator++()
steps to next record
Definition cursor.hpp:60
std::vector< T > dump()
returns the rest of the result set in vector
Definition cursor.hpp:75
Cursor< T > & operator++(int)
steps to next record
Definition cursor.hpp:41
T operator*()
returns current record
Definition cursor.hpp:82
A base class of databases.
Definition database.hpp:37
exception thrown when a record is not found
Definition except.hpp:32
SQL data row wrapper.
Definition types.hpp:20
contains class Record and typedef Records