SQT
A C++ ORM framework for SQLite
Loading...
Searching...
No Matches

◆ begin()

template<SelecterType SELECTER>
iterator sqt::Result< SELECTER >::begin ( ) const

Creates an iterator pointing to the beginning of the result elements.

Returns
An iterator pointing to the first result element. If the result is empty, the iterator will be the same as the iterator returned by end().
Exceptions
sqt::SQLErrorThrown if the creation of the iterator fails, typically due to a failure in the underlying query execution.

The execution of the SELECT statement is deferred until this method is called. If the execution fails, a sqt::SQLError exception will be thrown.

Warning
This method is intended to be called only once per result instance. To retrieve the result again, the executor must be reset and executed to create a new result instance.