iFun Engine API  1.0.0-b2601
Great Technology for Great Games
 All Classes Files Functions Variables Typedefs Macros
Public Member Functions | List of all members
fun::ResultSets Class Reference

Contains result sets and provides access interface.

#include <mariadb.h>

Public Member Functions

 ResultSets (const Ptr< Impl > &impl)
 
size_t GetAffectedRowCount () const
 Gets the affected row count of the current result set.
 
bool GetBool (size_t column_index, bool regard_null_as=false) const
 Gets the specified culumn's value of the current row as bool. More...
 
bool GetBool (const string &column_name, bool regard_null_as=false) const
 Gets the specified culumn's value of the current row as bool. More...
 
size_t GetColumnCount () const
 Gets the column count of the current result set. More...
 
string GetColumnName (const size_t &column_index) const
 Gets the column name of specified index. More...
 
enum_field_types GetColumnType (const size_t &column_index) const
 Gets the column type of specified index. More...
 
WallClock::Value GetDateTime (size_t column_index, const WallClock::Value &regard_null_as=WallClock::kEpochClock) const
 Gets the specified column's value of the current row as datetime. More...
 
WallClock::Value GetDateTime (const string &column_name, const WallClock::Value &regard_null_as=WallClock::kEpochClock) const
 Gets the specified culumn's value of the current row as datetime. More...
 
const string GetDateTimeString (size_t column_index, const string &regard_null_as="") const
 
double GetDouble (size_t column_index, double regard_null_as=0.0) const
 Gets the specified culumn's value of the current row as double. More...
 
double GetDouble (const string &column_name, double regard_null_as=0.0) const
 Gets the specified culumn's value of the current row as double. More...
 
float GetFloat (size_t column_index, float regard_null_as=0.0) const
 Gets the specified culumn's value of the current row as float. More...
 
float GetFloat (const string &column_name, float regard_null_as=0.0) const
 Gets the specified culumn's value of the current row as float. More...
 
int64_t GetInt (size_t column_index, int64_t regard_null_as=0) const
 Gets the specified culumn's value of the current row as int. More...
 
int64_t GetInt (const string &column_name, int64_t regard_null_as=0) const
 Gets the specified culumn's value of the current row as int. More...
 
int16_t GetInt16 (size_t column_index, int16_t regard_null_as=0) const
 
int32_t GetInt32 (size_t column_index, int32_t regard_null_as=0) const
 
int64_t GetInt64 (size_t column_index, int64_t regard_null_as=0) const
 
int8_t GetInt8 (size_t column_index, int8_t regard_null_as=0) const
 
size_t GetResultSetCount () const
 Gets the result set count. More...
 
size_t GetRowCount () const
 Gets the row count of the current result set. More...
 
const char * GetString (size_t column_index) const
 Gets the specified culumn's value of the current row as string. More...
 
const char * GetString (const string &column_name) const
 Gets the specified culumn's value of the current row as string. More...
 
WallClock::Duration GetTime (size_t column_index, const WallClock::Duration &regard_null_as=WallClock::kEmptyDuration) const
 Gets the specified column's value of the current row as time. More...
 
WallClock::Duration GetTime (const string &column_name, const WallClock::Duration &regard_null_as=WallClock::kEmptyDuration) const
 Gets the specified culumn's value of the current row as datetime. More...
 
uint64_t GetUint (size_t column_index, uint64_t regard_null_as=0) const
 Gets the specified culumn's value of the current row as unsigned int. More...
 
uint64_t GetUint (const string &column_name, uint64_t regard_null_as=0) const
 Gets the specified culumn's value of the current row as unsigned int. More...
 
uint16_t GetUint16 (size_t column_index, uint16_t regard_null_as=0) const
 
uint32_t GetUint32 (size_t column_index, uint32_t regard_null_as=0) const
 
uint64_t GetUint64 (size_t column_index, uint64_t regard_null_as=0) const
 
uint8_t GetUint8 (size_t column_index, uint8_t regard_null_as=0) const
 
bool IsNull (size_t column_index) const
 Check the specified column's value of the current row is null. More...
 
bool SeekNextResultSet ()
 Seeks the next result set. More...
 
bool SeekNextRow ()
 Seeks the next row. More...
 

Member Function Documentation

bool fun::ResultSets::GetBool ( size_t  column_index,
bool  regard_null_as = false 
) const
Parameters
column_indexcolumn index.
Returns
column value.
bool fun::ResultSets::GetBool ( const string &  column_name,
bool  regard_null_as = false 
) const
Parameters
column_namecolumn name.
Returns
column value.
size_t fun::ResultSets::GetColumnCount ( ) const
Returns
the column count of the current result set.
string fun::ResultSets::GetColumnName ( const size_t &  column_index) const
Parameters
column_indexcolumn index.
Returns
column name
enum_field_types fun::ResultSets::GetColumnType ( const size_t &  column_index) const
Parameters
column_indexcolumn index.
Returns
column type. See mysql/mysql_com.h
WallClock::Value fun::ResultSets::GetDateTime ( size_t  column_index,
const WallClock::Value &  regard_null_as = WallClock::kEpochClock 
) const
Parameters
column_indexcolumn index.
Returns
column value.
WallClock::Value fun::ResultSets::GetDateTime ( const string &  column_name,
const WallClock::Value &  regard_null_as = WallClock::kEpochClock 
) const
Parameters
column_namecolumn name.
Returns
column value.
double fun::ResultSets::GetDouble ( size_t  column_index,
double  regard_null_as = 0.0 
) const
Parameters
column_indexcolumn index.
Returns
column value.
double fun::ResultSets::GetDouble ( const string &  column_name,
double  regard_null_as = 0.0 
) const
Parameters
column_namecolumn name.
Returns
column value.
float fun::ResultSets::GetFloat ( size_t  column_index,
float  regard_null_as = 0.0 
) const
Parameters
column_indexcolumn index.
Returns
column value.
float fun::ResultSets::GetFloat ( const string &  column_name,
float  regard_null_as = 0.0 
) const
Parameters
column_namecolumn name.
Returns
column value.
int64_t fun::ResultSets::GetInt ( size_t  column_index,
int64_t  regard_null_as = 0 
) const
Parameters
column_indexcolumn index.
Returns
column value.
int64_t fun::ResultSets::GetInt ( const string &  column_name,
int64_t  regard_null_as = 0 
) const
Parameters
column_namecolumn name.
Returns
column value.
size_t fun::ResultSets::GetResultSetCount ( ) const
Returns
the result set count.
size_t fun::ResultSets::GetRowCount ( ) const
Returns
the row count of the current result set.
const char* fun::ResultSets::GetString ( size_t  column_index) const
Parameters
column_indexcolumn index.
Returns
column value.
const char* fun::ResultSets::GetString ( const string &  column_name) const
Parameters
column_namecolumn name.
Returns
column value.
WallClock::Duration fun::ResultSets::GetTime ( size_t  column_index,
const WallClock::Duration &  regard_null_as = WallClock::kEmptyDuration 
) const
Parameters
column_indexcolumn index.
Returns
column value.
WallClock::Duration fun::ResultSets::GetTime ( const string &  column_name,
const WallClock::Duration &  regard_null_as = WallClock::kEmptyDuration 
) const
Parameters
column_namecolumn name.
Returns
column value.
uint64_t fun::ResultSets::GetUint ( size_t  column_index,
uint64_t  regard_null_as = 0 
) const
Parameters
column_indexcolumn index.
Returns
column value.
uint64_t fun::ResultSets::GetUint ( const string &  column_name,
uint64_t  regard_null_as = 0 
) const
Parameters
column_namecolumn name.
Returns
column value.
bool fun::ResultSets::IsNull ( size_t  column_index) const
Parameters
column_indexcolumn index.
bool fun::ResultSets::SeekNextResultSet ( )
Returns
true if it is not the last result set.
bool fun::ResultSets::SeekNextRow ( )
Returns
true if it is not the last row.