pg_async
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
tip::db::pg::resultset::row Class Reference

#include <resultset.hpp>

Inheritance diagram for tip::db::pg::resultset::row:
Inheritance graph
[legend]
Collaboration diagram for tip::db::pg::resultset::row:
Collaboration graph
[legend]

Public Types

typedef smallint size_type
 
typedef resultset::difference_type difference_type
 
Field container concept
typedef const_field_iterator const_iterator
 
typedef
const_reverse_field_iterator 
const_reverse_iterator
 
typedef class field value_type
 
typedef class field reference
 
typedef const_iterator pointer
 

Public Member Functions

size_type row_index () const
 
template<typename... T>
void to (std::tuple< T... > &) const
 
template<typename... T>
void to (std::tuple< T &... >) const
 
template<typename... T>
void to (T &...) const
 
template<typename... T>
void to (T &...val) const
 
Field container interface
size_type size () const
 
bool empty () const
 
const_iterator begin () const
 
const_iterator end () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
Field access
reference operator[] (size_type index) const
 
reference operator[] (std::string const &name) const
 

Static Public Attributes

static const size_type npos
 

Protected Member Functions

 row (result_pointer res, resultset::size_type idx)
 

Protected Attributes

result_pointer result_
 
resultset::size_type row_index_
 

Friends

class resultset
 

Detailed Description

Represents a data row in the result set. Doesn't hold any data except a pointer to the result set and the data row index. Must not outlive the parent result set. Row is not constructible outside of the result set;

Definition at line 238 of file resultset.hpp.

Member Typedef Documentation

Definition at line 245 of file resultset.hpp.

Definition at line 246 of file resultset.hpp.

Definition at line 241 of file resultset.hpp.

Definition at line 250 of file resultset.hpp.

Definition at line 249 of file resultset.hpp.

Definition at line 240 of file resultset.hpp.

Definition at line 248 of file resultset.hpp.

Constructor & Destructor Documentation

tip::db::pg::resultset::row::row ( result_pointer  res,
resultset::size_type  idx 
)
inlineprotected

Construct a row object in a result set.

Parameters
res
idx

Definition at line 320 of file resultset.hpp.

Member Function Documentation

const_iterator tip::db::pg::resultset::row::begin ( ) const

Iterator to the beginning of field sequence

bool tip::db::pg::resultset::row::empty ( ) const

Is row empty. Actually, shouln'd happen in a non-empty result set.

Returns
const_iterator tip::db::pg::resultset::row::end ( ) const

Iterator past the field sequence

reference tip::db::pg::resultset::row::operator[] ( size_type  index) const

Get field by it's index.

Parameters
index
Returns
reference tip::db::pg::resultset::row::operator[] ( std::string const &  name) const

Get field by it's name

Parameters
name
Returns
const_reverse_iterator tip::db::pg::resultset::row::rbegin ( ) const
const_reverse_iterator tip::db::pg::resultset::row::rend ( ) const
size_type tip::db::pg::resultset::row::row_index ( ) const
inline

< Index of the row in the result set

Definition at line 255 of file resultset.hpp.

size_type tip::db::pg::resultset::row::size ( ) const

Number of fields

template<typename... T>
void tip::db::pg::resultset::row::to ( T &...  val) const

Definition at line 94 of file resultset.inl.

template<typename... T>
void tip::db::pg::resultset::row::to ( std::tuple< T... > &  val) const

Get the row as a tuple of typed values

Parameters
targettuple

Definition at line 78 of file resultset.inl.

template<typename... T>
void tip::db::pg::resultset::row::to ( std::tuple< T &... >  val) const

Definition at line 85 of file resultset.inl.

template<typename... T>
void tip::db::pg::resultset::row::to ( T &  ...) const

Friends And Related Function Documentation

friend class resultset
friend

Definition at line 314 of file resultset.hpp.

Member Data Documentation

const size_type tip::db::pg::resultset::row::npos
static

Definition at line 252 of file resultset.hpp.

result_pointer tip::db::pg::resultset::row::result_
protected

Definition at line 323 of file resultset.hpp.

resultset::size_type tip::db::pg::resultset::row::row_index_
protected

Definition at line 324 of file resultset.hpp.


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