ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SqlDatabase::Statement::iterator Class Reference

Iterates over the result rows. More...

#include <SqlDatabase.h>

Public Member Functions

 iterator ()
 
 iterator (const StatementPtr &stmt, size_t execution_seq)
 
template<typename T >
get (size_t idx)
 
int32_t get_i32 (size_t idx)
 
int64_t get_i64 (size_t idx)
 
uint32_t get_u32 (size_t idx)
 
uint64_t get_u64 (size_t idx)
 
double get_dbl (size_t idx)
 
std::string get_str (size_t idx)
 
iteratoroperator++ ()
 
bool at_eof () const
 
bool operator== (const iterator &other) const
 
bool operator!= (const iterator &other) const
 
template<>
NoColumn get (size_t idx)
 
template<>
int64_t get (size_t idx)
 
template<>
uint64_t get (size_t idx)
 
template<>
int32_t get (size_t idx)
 
template<>
uint32_t get (size_t idx)
 
template<>
float get (size_t idx)
 
template<>
double get (size_t idx)
 

Private Member Functions

void init ()
 
void check () const
 

Private Attributes

StatementPtr stmt
 
size_t execution_seq
 
size_t row_num
 

Detailed Description

Iterates over the result rows.

Statement iterators are very restricted compared to normal C++ STL iterators because statement iterators access result rows that are not actually stored locally and the underlying drivers often don't provide an easy way to save an entire row.

Definition at line 350 of file SqlDatabase.h.

Constructor & Destructor Documentation

SqlDatabase::Statement::iterator::iterator ( )
inline

Definition at line 352 of file SqlDatabase.h.

References Dbg::init().

SqlDatabase::Statement::iterator::iterator ( const StatementPtr stmt,
size_t  execution_seq 
)
inline

Definition at line 353 of file SqlDatabase.h.

References Dbg::init().

Member Function Documentation

template<typename T >
T SqlDatabase::Statement::iterator::get ( size_t  idx)
int32_t SqlDatabase::Statement::iterator::get_i32 ( size_t  idx)
int64_t SqlDatabase::Statement::iterator::get_i64 ( size_t  idx)
uint32_t SqlDatabase::Statement::iterator::get_u32 ( size_t  idx)
uint64_t SqlDatabase::Statement::iterator::get_u64 ( size_t  idx)
double SqlDatabase::Statement::iterator::get_dbl ( size_t  idx)
std::string SqlDatabase::Statement::iterator::get_str ( size_t  idx)
iterator& SqlDatabase::Statement::iterator::operator++ ( )
bool SqlDatabase::Statement::iterator::at_eof ( ) const
bool SqlDatabase::Statement::iterator::operator== ( const iterator other) const
bool SqlDatabase::Statement::iterator::operator!= ( const iterator other) const
inline

Definition at line 365 of file SqlDatabase.h.

void SqlDatabase::Statement::iterator::init ( )
private
void SqlDatabase::Statement::iterator::check ( ) const
private
template<>
NoColumn SqlDatabase::Statement::iterator::get ( size_t  idx)
template<>
int64_t SqlDatabase::Statement::iterator::get ( size_t  idx)
template<>
uint64_t SqlDatabase::Statement::iterator::get ( size_t  idx)
template<>
int32_t SqlDatabase::Statement::iterator::get ( size_t  idx)
template<>
uint32_t SqlDatabase::Statement::iterator::get ( size_t  idx)
template<>
float SqlDatabase::Statement::iterator::get ( size_t  idx)
template<>
double SqlDatabase::Statement::iterator::get ( size_t  idx)

Member Data Documentation

StatementPtr SqlDatabase::Statement::iterator::stmt
private

Definition at line 370 of file SqlDatabase.h.

size_t SqlDatabase::Statement::iterator::execution_seq
private

Definition at line 371 of file SqlDatabase.h.

size_t SqlDatabase::Statement::iterator::row_num
private

Definition at line 372 of file SqlDatabase.h.


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