Darwin Neuroevolution Framework
Public Types | Public Member Functions | List of all members
db::ResultSet< TYPES > Class Template Reference

Represents the results of executing a query. More...

#include <database.h>

Public Types

using Row = tuple< optional< TYPES >... >
 A results row.
 

Public Member Functions

const Rowoperator[] (size_t index) const
 Indexed access to the rows in the result.
 
int columnCount () const
 Count of columns in the results.
 
size_t size () const
 Count of rows in the results.
 
bool empty () const
 Returns true if the ResultSet is empty.
 
auto begin () const
 ResultSet begin iterator.
 
auto end () const
 ResultSet end iterator.
 
const auto & singleValue () const
 Convenience helper for extracting a single value. More...
 

Detailed Description

template<class... TYPES>
class db::ResultSet< TYPES >

Represents the results of executing a query.

See also
db::Connection::exec()

Member Function Documentation

◆ singleValue()

template<class... TYPES>
const auto& db::ResultSet< TYPES >::singleValue ( ) const
inline

Convenience helper for extracting a single value.

Exceptions
core::Exceptionif the ResultSet has more than one value (one row/col)

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