boost_sqlite 1
A sqlite C++ library
Loading...
Searching...
No Matches
boost::sqlite::resultset Struct Reference

Representation of a result from a database. More...

#include <include/boost/sqlite/resultset.hpp>

Classes

struct  iterator
 The input iterator can be used to read every row in a for-loop. More...
 

Public Member Functions

iterator begin ()
 Return an input iterator to the currently unread row.
 
core::string_view column_name (std::size_t idx) const
 Returns the name of the column idx.
 
core::string_view column_origin_name (std::size_t idx) const
 Returns the origin name of the column for column idx.
 
row current () const &
 Returns the current row.
 
bool done () const
 Checks if the last row has been reached.
 
iterator end ()
 Sentinel iterator.
 
core::string_view table_name (std::size_t idx) const
 Returns the name of the source table for column idx.
 
bool read_next (system::error_code &ec, error_info &ei)
 
bool read_next ()
 

Detailed Description

Representation of a result from a database.

If is a forward-range with output iterators.

Example
extern sqlite::connection conn;
sqlite::resultset rs = conn.query("select * from users;");
do
{
handle_row(r.current());
}
while (rs.read_next()) // read it line by line
main object for a connection to a database.
Representation of a result from a database.
Definition resultset.hpp:41

Definition at line 40 of file resultset.hpp.

Member Function Documentation

◆ read_next() [1/2]

bool boost::sqlite::resultset::read_next ( )

Read the next row. Returns false if there's nothing more to read.

◆ read_next() [2/2]

bool boost::sqlite::resultset::read_next ( system::error_code & ec,
error_info & ei )

Read the next row. Returns false if there's nothing more to read.


The documentation for this struct was generated from the following file: