SQT
A C++ ORM framework for SQLite
Loading...
Searching...
No Matches
sqt::Result< SELECTER > Class Template Reference

#include <sqt/orm/executor/result.h>

Description

template<SelecterType SELECTER>
class sqt::Result< SELECTER >

Represents the result of a selecter, providing interfaces to retrieve the result elements.

Template Parameters
SELECTERThe selecter type on which this result is based. The type of the result elements is determined by the selecter type.

A sqt::Result<> instance is returned by the sqt::Executor<>::Execute() method when a selecter is used as the argument. It provides a container-like interface to iterate over the result elements.

The type of the result elements is determined by the selecter type. The following list is the possible result element types:

The sqt::Result<> instances are intended to be one-time use only. Do not store the instances for any purpose. If the same query needs to be executed again, reset the executor and execute again to create a new sqt::Result<> instance.

See also
sqt::DataContext<>
sqt::Executor<>
sqt::SelecterType

Public Types

using value_type = SELECTER::ResultElementType
using iterator = Iterator<SELECTER>
using const_iterator = iterator

Public Member Functions

 Result (Statement &statement) noexcept
 Result (Result &)=delete
Resultoperator= (const Result &)=delete
iterator begin () const
iterator end () const noexcept
const_iterator cbegin () const
const_iterator cend () const noexcept
std::vector< value_typeToVector () const
std::list< value_typeToList () const
std::deque< value_typeToDeque () const