iFun Engine API  1.0.0-b6053
Great Technology for Great Games
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)
 
 DECLARE_CLASS_PTR (ResultSets)
 
const char * GetBinary (size_t column_index) const
 Gets the specified culumn's value of the current row as binary. More...
 
const char * GetBinary (const string &column_name) const
 Gets the specified culumn's value of the current row as binary. More...
 
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...
 
size_t GetCountOfAffectedRows () const
 Gets the count of affected rows for first CRUD query.
 
const std::vector< size_t > & GetCountsOfAffectedRows () const
 Gets the counts of affected rows.
 
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...
 
uint64_t GetFieldLength (size_t column_index) const
 Gets the length of specified culumn's value of the current row. More...
 
uint64_t GetFieldLength (const string &column_name) const
 Gets the length of specified culumn's value of the current row. 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

◆ GetBinary() [1/2]

const char* fun::ResultSets::GetBinary ( size_t  column_index) const
Parameters
column_indexcolumn index.
Returns
column value.

◆ GetBinary() [2/2]

const char* fun::ResultSets::GetBinary ( const string column_name) const
Parameters
column_namecolumn name.
Returns
column value.

◆ GetBool() [1/2]

bool fun::ResultSets::GetBool ( size_t  column_index,
bool  regard_null_as = false 
) const
Parameters
column_indexcolumn index.
Returns
column value.

◆ GetBool() [2/2]

bool fun::ResultSets::GetBool ( const string column_name,
bool  regard_null_as = false 
) const
Parameters
column_namecolumn name.
Returns
column value.

◆ GetColumnCount()

size_t fun::ResultSets::GetColumnCount ( ) const
Returns
the column count of the current result set.

◆ GetColumnName()

string fun::ResultSets::GetColumnName ( const size_t &  column_index) const
Parameters
column_indexcolumn index.
Returns
column name

◆ GetColumnType()

enum_field_types fun::ResultSets::GetColumnType ( const size_t &  column_index) const
Parameters
column_indexcolumn index.
Returns
column type. See mysql/mysql_com.h

◆ GetDateTime() [1/2]

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.

◆ GetDateTime() [2/2]

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.

◆ GetDouble() [1/2]

double fun::ResultSets::GetDouble ( size_t  column_index,
double  regard_null_as = 0.0 
) const
Parameters
column_indexcolumn index.
Returns
column value.

◆ GetDouble() [2/2]

double fun::ResultSets::GetDouble ( const string column_name,
double  regard_null_as = 0.0 
) const
Parameters
column_namecolumn name.
Returns
column value.

◆ GetFieldLength() [1/2]

uint64_t fun::ResultSets::GetFieldLength ( size_t  column_index) const
Parameters
column_indexcolumn index.
Returns
column value.

◆ GetFieldLength() [2/2]

uint64_t fun::ResultSets::GetFieldLength ( const string column_name) const
Parameters
column_namecolumn name.
Returns
column value.

◆ GetFloat() [1/2]

float fun::ResultSets::GetFloat ( size_t  column_index,
float  regard_null_as = 0.0 
) const
Parameters
column_indexcolumn index.
Returns
column value.

◆ GetFloat() [2/2]

float fun::ResultSets::GetFloat ( const string column_name,
float  regard_null_as = 0.0 
) const
Parameters
column_namecolumn name.
Returns
column value.

◆ GetInt() [1/2]

int64_t fun::ResultSets::GetInt ( size_t  column_index,
int64_t  regard_null_as = 0 
) const
Parameters
column_indexcolumn index.
Returns
column value.

◆ GetInt() [2/2]

int64_t fun::ResultSets::GetInt ( const string column_name,
int64_t  regard_null_as = 0 
) const
Parameters
column_namecolumn name.
Returns
column value.

◆ GetResultSetCount()

size_t fun::ResultSets::GetResultSetCount ( ) const
Returns
the result set count.

◆ GetRowCount()

size_t fun::ResultSets::GetRowCount ( ) const
Returns
the row count of the current result set.

◆ GetString() [1/2]

const char* fun::ResultSets::GetString ( size_t  column_index) const
Parameters
column_indexcolumn index.
Returns
column value.

◆ GetString() [2/2]

const char* fun::ResultSets::GetString ( const string column_name) const
Parameters
column_namecolumn name.
Returns
column value.

◆ GetTime() [1/2]

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.

◆ GetTime() [2/2]

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.

◆ GetUint() [1/2]

uint64_t fun::ResultSets::GetUint ( size_t  column_index,
uint64_t  regard_null_as = 0 
) const
Parameters
column_indexcolumn index.
Returns
column value.

◆ GetUint() [2/2]

uint64_t fun::ResultSets::GetUint ( const string column_name,
uint64_t  regard_null_as = 0 
) const
Parameters
column_namecolumn name.
Returns
column value.

◆ IsNull()

bool fun::ResultSets::IsNull ( size_t  column_index) const
Parameters
column_indexcolumn index.

◆ SeekNextResultSet()

bool fun::ResultSets::SeekNextResultSet ( )
Returns
true if it is not the last result set.

◆ SeekNextRow()

bool fun::ResultSets::SeekNextRow ( )
Returns
true if it is not the last row.