MySQL 9.1.0
Source Code Documentation
Sql_resultset Class Reference

#include <sql_resultset.h>

Public Member Functions

 Sql_resultset ()
 
 ~Sql_resultset ()
 
void new_row ()
 
void new_field (Field_value *val)
 
void clear ()
 resultset class More...
 
bool next ()
 
void absolute (int row)
 
void first ()
 
void last ()
 
void increment_rows ()
 
void set_rows (uint rows)
 Set Methods. More...
 
void set_cols (uint cols)
 
void set_charset (const CHARSET_INFO *result_cs)
 set resultset charset info More...
 
void set_server_status (uint server_status)
 set server status. More...
 
void set_warn_count (uint warn_count)
 set count of warning issued during command execution More...
 
void set_affected_rows (ulonglong affected_rows)
 set rows affected due to last command execution More...
 
void set_last_insert_id (ulonglong last_insert_id)
 set value of the AUTOINCREMENT column for the last INSERT More...
 
void set_message (std::string msg)
 set client message More...
 
void set_sql_errno (uint sql_errno)
 set sql error number saved during error in last command execution More...
 
void set_err_msg (std::string msg)
 set sql error message saved during error in last command execution More...
 
void set_sqlstate (std::string state)
 set sql error state saved during error in last command execution More...
 
void set_killed ()
 
uint get_rows ()
 Get Methods. More...
 
uint get_cols ()
 
const CHARSET_INFOget_charset ()
 get resultset charset info More...
 
uint get_server_status ()
 get server status. More...
 
uint get_warn_count ()
 get count of warning issued during command execution More...
 
ulonglong get_affected_rows ()
 return rows affected dure to last command execution More...
 
ulonglong get_last_insert_id ()
 get value of the AUTOINCREMENT column for the last INSERT More...
 
std::string get_message ()
 get client message More...
 
uint sql_errno ()
 Getting error info. More...
 
std::string err_msg ()
 get sql error message saved during error in last command execution More...
 
std::string sqlstate ()
 get sql error state saved during error in last command execution More...
 
longlong getLong (uint columnIndex)
 
decimal_t getDecimal (uint columnIndex)
 
double getDouble (uint columnIndex)
 
MYSQL_TIME getTime (uint columnIndex)
 
char * getString (uint columnIndex)
 
void set_metadata (Field_type ftype)
 
std::string get_database (uint rowIndex=0)
 
std::string get_table (uint rowIndex=0)
 
std::string get_org_table (uint rowIndex=0)
 
std::string get_column_name (uint rowIndex=0)
 
std::string get_org_column_name (uint rowIndex=0)
 
unsigned long get_length (uint rowIndex=0)
 
unsigned int get_charsetnr (uint rowIndex=0)
 
unsigned int get_flags (uint rowIndex=0)
 
unsigned int get_decimals (uint rowIndex=0)
 
enum_field_types get_field_type (uint rowIndex=0)
 
bool get_killed_status ()
 

Private Attributes

std::vector< std::vector< Field_value * > > result_value
 
std::vector< Field_typeresult_meta
 
int current_row
 
uint num_cols
 
uint num_rows
 
uint num_metarow
 
const CHARSET_INFOm_resultcs
 
uint m_server_status
 
uint m_warn_count
 
ulonglong m_affected_rows
 
ulonglong m_last_insert_id
 
std::string m_message
 
uint m_sql_errno
 
std::string m_err_msg
 
std::string m_sqlstate
 
bool m_killed
 

Constructor & Destructor Documentation

◆ Sql_resultset()

Sql_resultset::Sql_resultset ( )
inline

◆ ~Sql_resultset()

Sql_resultset::~Sql_resultset ( )
inline

Member Function Documentation

◆ absolute()

void Sql_resultset::absolute ( int  row)
inline

◆ clear()

void Sql_resultset::clear ( )

resultset class

◆ err_msg()

std::string Sql_resultset::err_msg ( )
inline

get sql error message saved during error in last command execution

Returns
the sql error message

◆ first()

void Sql_resultset::first ( )
inline

◆ get_affected_rows()

ulonglong Sql_resultset::get_affected_rows ( )
inline

return rows affected dure to last command execution

Returns
affected_row

◆ get_charset()

const CHARSET_INFO * Sql_resultset::get_charset ( )
inline

get resultset charset info

Returns
charset info

◆ get_charsetnr()

unsigned int Sql_resultset::get_charsetnr ( uint  rowIndex = 0)
inline

◆ get_cols()

uint Sql_resultset::get_cols ( )
inline

◆ get_column_name()

std::string Sql_resultset::get_column_name ( uint  rowIndex = 0)
inline

◆ get_database()

std::string Sql_resultset::get_database ( uint  rowIndex = 0)
inline

◆ get_decimals()

unsigned int Sql_resultset::get_decimals ( uint  rowIndex = 0)
inline

◆ get_field_type()

enum_field_types Sql_resultset::get_field_type ( uint  rowIndex = 0)
inline

◆ get_flags()

unsigned int Sql_resultset::get_flags ( uint  rowIndex = 0)
inline

◆ get_killed_status()

bool Sql_resultset::get_killed_status ( )
inline

◆ get_last_insert_id()

ulonglong Sql_resultset::get_last_insert_id ( )
inline

get value of the AUTOINCREMENT column for the last INSERT

Returns
the sql error number

◆ get_length()

unsigned long Sql_resultset::get_length ( uint  rowIndex = 0)
inline

◆ get_message()

std::string Sql_resultset::get_message ( )
inline

get client message

Returns
message

◆ get_org_column_name()

std::string Sql_resultset::get_org_column_name ( uint  rowIndex = 0)
inline

◆ get_org_table()

std::string Sql_resultset::get_org_table ( uint  rowIndex = 0)
inline

◆ get_rows()

uint Sql_resultset::get_rows ( )
inline

Get Methods.

◆ get_server_status()

uint Sql_resultset::get_server_status ( )
inline

get server status.

check mysql_com for more details

Returns
server status

◆ get_table()

std::string Sql_resultset::get_table ( uint  rowIndex = 0)
inline

◆ get_warn_count()

uint Sql_resultset::get_warn_count ( )
inline

get count of warning issued during command execution

Returns
warn_count

◆ getDecimal()

decimal_t Sql_resultset::getDecimal ( uint  columnIndex)
inline

◆ getDouble()

double Sql_resultset::getDouble ( uint  columnIndex)
inline

◆ getLong()

longlong Sql_resultset::getLong ( uint  columnIndex)
inline

◆ getString()

char * Sql_resultset::getString ( uint  columnIndex)
inline

◆ getTime()

MYSQL_TIME Sql_resultset::getTime ( uint  columnIndex)
inline

◆ increment_rows()

void Sql_resultset::increment_rows ( )
inline

◆ last()

void Sql_resultset::last ( )
inline

◆ new_field()

void Sql_resultset::new_field ( Field_value val)

◆ new_row()

void Sql_resultset::new_row ( )

◆ next()

bool Sql_resultset::next ( )

◆ set_affected_rows()

void Sql_resultset::set_affected_rows ( ulonglong  affected_rows)
inline

set rows affected due to last command execution

Parameters
affected_rowsnumber of rows affected due to last operation

◆ set_charset()

void Sql_resultset::set_charset ( const CHARSET_INFO result_cs)
inline

set resultset charset info

Parameters
result_cscharset of resulset

◆ set_cols()

void Sql_resultset::set_cols ( uint  cols)
inline

◆ set_err_msg()

void Sql_resultset::set_err_msg ( std::string  msg)
inline

set sql error message saved during error in last command execution

Parameters
msgsql error message

◆ set_killed()

void Sql_resultset::set_killed ( )
inline

◆ set_last_insert_id()

void Sql_resultset::set_last_insert_id ( ulonglong  last_insert_id)
inline

set value of the AUTOINCREMENT column for the last INSERT

Parameters
last_insert_idlast inserted value in AUTOINCREMENT column

◆ set_message()

void Sql_resultset::set_message ( std::string  msg)
inline

set client message

Parameters
msgclient message

◆ set_metadata()

void Sql_resultset::set_metadata ( Field_type  ftype)
inline

◆ set_rows()

void Sql_resultset::set_rows ( uint  rows)
inline

Set Methods.

◆ set_server_status()

void Sql_resultset::set_server_status ( uint  server_status)
inline

set server status.

check mysql_com for more details

Parameters
server_statusserver status

◆ set_sql_errno()

void Sql_resultset::set_sql_errno ( uint  sql_errno)
inline

set sql error number saved during error in last command execution

Parameters
sql_errnosql error number

◆ set_sqlstate()

void Sql_resultset::set_sqlstate ( std::string  state)
inline

set sql error state saved during error in last command execution

Parameters
statesql error state

◆ set_warn_count()

void Sql_resultset::set_warn_count ( uint  warn_count)
inline

set count of warning issued during command execution

Parameters
warn_countnumber of warning

◆ sql_errno()

uint Sql_resultset::sql_errno ( )
inline

Getting error info.

get sql error number saved during error in last command execution

Returns
the sql error number
Return values
0OK
!=0SQL Error Number

◆ sqlstate()

std::string Sql_resultset::sqlstate ( )
inline

get sql error state saved during error in last command execution

Returns
the sql error state

Member Data Documentation

◆ current_row

int Sql_resultset::current_row
private

◆ m_affected_rows

ulonglong Sql_resultset::m_affected_rows
private

◆ m_err_msg

std::string Sql_resultset::m_err_msg
private

◆ m_killed

bool Sql_resultset::m_killed
private

◆ m_last_insert_id

ulonglong Sql_resultset::m_last_insert_id
private

◆ m_message

std::string Sql_resultset::m_message
private

◆ m_resultcs

const CHARSET_INFO* Sql_resultset::m_resultcs
private

◆ m_server_status

uint Sql_resultset::m_server_status
private

◆ m_sql_errno

uint Sql_resultset::m_sql_errno
private

◆ m_sqlstate

std::string Sql_resultset::m_sqlstate
private

◆ m_warn_count

uint Sql_resultset::m_warn_count
private

◆ num_cols

uint Sql_resultset::num_cols
private

◆ num_metarow

uint Sql_resultset::num_metarow
private

◆ num_rows

uint Sql_resultset::num_rows
private

◆ result_meta

std::vector<Field_type> Sql_resultset::result_meta
private

◆ result_value

std::vector<std::vector<Field_value *> > Sql_resultset::result_value
private

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