Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
PreparedResultSet Class Reference

#include <QueryResult.h>

Public Member Functions

FieldFetch () const
uint32 GetFieldCount () const
uint64 GetRowCount () const
bool NextRow ()
const Fieldoperator[] (uint32 index) const
 PreparedResultSet (MYSQL_STMT *stmt, MYSQL_RES *result, uint64 rowCount, uint32 fieldCount)
 ~PreparedResultSet ()

Protected Attributes

uint32 m_fieldCount
uint64 m_rowCount
uint64 m_rowPosition
std::vector< Field * > m_rows

Private Member Functions

bool _NextRow ()
void CleanUp ()
void FreeBindBuffer ()
PreparedResultSetoperator= (PreparedResultSet const &right)=delete
 PreparedResultSet (PreparedResultSet const &right)=delete

Private Attributes

bool * m_isNull
unsigned long * m_length
MYSQL_BIND * m_rBind
MYSQL_RES * m_res
MYSQL_STMT * m_stmt

Detailed Description

Definition at line 50 of file QueryResult.h.

Constructor & Destructor Documentation

◆ PreparedResultSet() [1/2]

PreparedResultSet::PreparedResultSet ( MYSQL_STMT * stmt,
MYSQL_RES * result,
uint64 rowCount,
uint32 fieldCount )

All data is buffered, let go of mysql c api structures

Definition at line 19 of file QueryResult.cpp.

References _NextRow(), CleanUp(), m_fieldCount, m_isNull, m_length, m_rBind, m_res, m_rowCount, m_rowPosition, m_rows, m_stmt, SF_LOG_WARN, and Field::SizeForType().

Referenced by operator=(), and PreparedResultSet().

◆ ~PreparedResultSet()

PreparedResultSet::~PreparedResultSet ( )

Definition at line 133 of file QueryResult.cpp.

References m_rowCount, and m_rows.

◆ PreparedResultSet() [2/2]

PreparedResultSet::PreparedResultSet ( PreparedResultSet const & right)
privatedelete

References PreparedResultSet().

Member Function Documentation

◆ _NextRow()

bool PreparedResultSet::_NextRow ( )
private

Only called in low-level code, namely the constructor Will iterate over every row of data and buffer it

Definition at line 176 of file QueryResult.cpp.

References m_rowCount, m_rowPosition, and m_stmt.

Referenced by PreparedResultSet().

◆ CleanUp()

void PreparedResultSet::CleanUp ( )
private

More of the in our code allocated sources are deallocated by the poorly documented mysql c api

Definition at line 209 of file QueryResult.cpp.

References FreeBindBuffer(), m_rBind, m_res, and m_stmt.

Referenced by PreparedResultSet().

◆ Fetch()

Field * PreparedResultSet::Fetch ( ) const
inline

Definition at line 60 of file QueryResult.h.

References ASSERT, m_rowCount, m_rowPosition, and m_rows.

◆ FreeBindBuffer()

void PreparedResultSet::FreeBindBuffer ( )
private

Definition at line 221 of file QueryResult.cpp.

References m_fieldCount, and m_rBind.

Referenced by CleanUp().

◆ GetFieldCount()

uint32 PreparedResultSet::GetFieldCount ( ) const
inline

Definition at line 58 of file QueryResult.h.

References m_fieldCount.

◆ GetRowCount()

◆ NextRow()

bool PreparedResultSet::NextRow ( )

Only updates the m_rowPosition so upper level code knows in which element of the rows vector to look

Definition at line 166 of file QueryResult.cpp.

References m_rowCount, and m_rowPosition.

◆ operator=()

PreparedResultSet & PreparedResultSet::operator= ( PreparedResultSet const & right)
privatedelete

References PreparedResultSet().

◆ operator[]()

const Field & PreparedResultSet::operator[] ( uint32 index) const
inline

Definition at line 66 of file QueryResult.h.

References ASSERT, m_fieldCount, m_rowCount, m_rowPosition, and m_rows.

Member Data Documentation

◆ m_fieldCount

uint32 PreparedResultSet::m_fieldCount
protected

Definition at line 77 of file QueryResult.h.

Referenced by FreeBindBuffer(), GetFieldCount(), operator[](), and PreparedResultSet().

◆ m_isNull

bool* PreparedResultSet::m_isNull
private

Definition at line 84 of file QueryResult.h.

Referenced by PreparedResultSet().

◆ m_length

unsigned long* PreparedResultSet::m_length
private

Definition at line 85 of file QueryResult.h.

Referenced by PreparedResultSet().

◆ m_rBind

MYSQL_BIND* PreparedResultSet::m_rBind
private

Definition at line 80 of file QueryResult.h.

Referenced by CleanUp(), FreeBindBuffer(), and PreparedResultSet().

◆ m_res

MYSQL_RES* PreparedResultSet::m_res
private

Definition at line 82 of file QueryResult.h.

Referenced by CleanUp(), and PreparedResultSet().

◆ m_rowCount

uint64 PreparedResultSet::m_rowCount
protected

◆ m_rowPosition

uint64 PreparedResultSet::m_rowPosition
protected

Definition at line 76 of file QueryResult.h.

Referenced by _NextRow(), Fetch(), NextRow(), operator[](), and PreparedResultSet().

◆ m_rows

std::vector<Field*> PreparedResultSet::m_rows
protected

Definition at line 74 of file QueryResult.h.

Referenced by Fetch(), operator[](), PreparedResultSet(), and ~PreparedResultSet().

◆ m_stmt

MYSQL_STMT* PreparedResultSet::m_stmt
private

Definition at line 81 of file QueryResult.h.

Referenced by _NextRow(), CleanUp(), and PreparedResultSet().


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