Represents a sql query result. More...
#include <result.hpp>
Public Types | |
typedef std::function< T *()> | t_creator_func |
typedef result_iterator< T > | iterator |
Public Member Functions | |
result (const result &x)=delete | |
result & | operator= (const result &x)=delete |
result ()=default | |
result (matador::detail::result_impl *impl) | |
result (matador::detail::result_impl *impl, const T &prototype) | |
result (result &&x) noexcept | |
result & | operator= (result &&x) noexcept |
iterator | begin () |
iterator | end () |
bool | empty () const |
std::size_t | size () const |
void | creator (const t_creator_func &creator_func) |
void | close () |
Friends | |
class | result_iterator< T > |
Represents a sql query result.
This class is used as a iterable result of a sql select query. Once such a query is executed one can iterate the result and each row is deserialized as the object of type T
T | The object type of the result |
typedef result_iterator<T> matador::result< T >::iterator |
Shortcut to the iterator type
typedef std::function<T*()> matador::result< T >::t_creator_func |
Shortcut to a creator function for the object type
|
default |
Empty result
|
inlineexplicit |
Creates a result initialized by the given result implementation
impl | Result implementation |
|
inline |
Creates a result initialized by the given result implementation and the given row prototype containing all expected columns.
impl | Result implementation |
prototype | The row prototype |
|
inlinenoexcept |
Copy moves a result from given result
x | The result ro move |
|
inline |
Returns the first object of the result set
|
inline |
Sets a creator function to create a custom object
creator_func | The custom creator function |
|
inline |
Returns true if the result set is empty
|
inline |
Returns the last element of the result set
|
inlinenoexcept |
Assignment move constructor for given result
x | The result ro move |
|
inline |
Returns the size of the result set