TrinityCore
MySQLPreparedStatement Class Reference

#include <MySQLPreparedStatement.h>

Public Member Functions

 MySQLPreparedStatement (MySQLStmt *stmt, std::string queryString)
 
 ~MySQLPreparedStatement ()
 
void BindParameters (PreparedStatementBase *stmt)
 
uint32 GetParameterCount () const
 

Protected Member Functions

void SetParameter (uint8 index, std::nullptr_t)
 
void SetParameter (uint8 index, bool value)
 
template<typename T >
void SetParameter (uint8 index, T value)
 
void SetParameter (uint8 index, std::string const &value)
 
void SetParameter (uint8 index, std::vector< uint8 > const &value)
 
MySQLStmtGetSTMT ()
 
MySQLBindGetBind ()
 
void ClearParameters ()
 
void AssertValidIndex (uint8 index)
 
std::string getQueryString () const
 

Protected Attributes

PreparedStatementBasem_stmt
 

Private Member Functions

 MySQLPreparedStatement (MySQLPreparedStatement const &right)=delete
 
MySQLPreparedStatementoperator= (MySQLPreparedStatement const &right)=delete
 

Private Attributes

MySQLStmtm_Mstmt
 
uint32 m_paramCount
 
std::vector< bool > m_paramsSet
 
MySQLBindm_bind
 
std::string const m_queryString
 

Friends

class MySQLConnection
 
class PreparedStatementBase
 

Detailed Description

Definition at line 32 of file MySQLPreparedStatement.h.

Constructor & Destructor Documentation

◆ MySQLPreparedStatement() [1/2]

MySQLPreparedStatement::MySQLPreparedStatement ( MySQLStmt stmt,
std::string  queryString 
)

Initialize variable parameters

"If set to 1, causes mysql_stmt_store_result() to update the metadata MYSQL_FIELD->max_length value."

Definition at line 39 of file MySQLPreparedStatement.cpp.

◆ ~MySQLPreparedStatement()

MySQLPreparedStatement::~MySQLPreparedStatement ( )

Definition at line 53 of file MySQLPreparedStatement.cpp.

+ Here is the call graph for this function:

◆ MySQLPreparedStatement() [2/2]

MySQLPreparedStatement::MySQLPreparedStatement ( MySQLPreparedStatement const &  right)
privatedelete

Member Function Documentation

◆ AssertValidIndex()

void MySQLPreparedStatement::AssertValidIndex ( uint8  index)
protected

Definition at line 103 of file MySQLPreparedStatement.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BindParameters()

void MySQLPreparedStatement::BindParameters ( PreparedStatementBase stmt)

Definition at line 65 of file MySQLPreparedStatement.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ClearParameters()

void MySQLPreparedStatement::ClearParameters ( )
protected

Definition at line 84 of file MySQLPreparedStatement.cpp.

+ Here is the caller graph for this function:

◆ GetBind()

MySQLBind * MySQLPreparedStatement::GetBind ( )
inlineprotected

Definition at line 54 of file MySQLPreparedStatement.h.

+ Here is the caller graph for this function:

◆ GetParameterCount()

uint32 MySQLPreparedStatement::GetParameterCount ( ) const
inline

Definition at line 43 of file MySQLPreparedStatement.h.

◆ getQueryString()

std::string MySQLPreparedStatement::getQueryString ( ) const
protected

Definition at line 182 of file MySQLPreparedStatement.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSTMT()

MySQLStmt * MySQLPreparedStatement::GetSTMT ( )
inlineprotected

Definition at line 53 of file MySQLPreparedStatement.h.

+ Here is the caller graph for this function:

◆ operator=()

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

◆ SetParameter() [1/5]

void MySQLPreparedStatement::SetParameter ( uint8  index,
bool  value 
)
protected

Definition at line 125 of file MySQLPreparedStatement.cpp.

+ Here is the call graph for this function:

◆ SetParameter() [2/5]

void MySQLPreparedStatement::SetParameter ( uint8  index,
std::nullptr_t   
)
protected

Definition at line 111 of file MySQLPreparedStatement.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetParameter() [3/5]

void MySQLPreparedStatement::SetParameter ( uint8  index,
std::string const &  value 
)
protected

Definition at line 148 of file MySQLPreparedStatement.cpp.

+ Here is the call graph for this function:

◆ SetParameter() [4/5]

void MySQLPreparedStatement::SetParameter ( uint8  index,
std::vector< uint8 > const &  value 
)
protected

Definition at line 165 of file MySQLPreparedStatement.cpp.

+ Here is the call graph for this function:

◆ SetParameter() [5/5]

template<typename T >
void MySQLPreparedStatement::SetParameter ( uint8  index,
value 
)
protected

Definition at line 131 of file MySQLPreparedStatement.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ MySQLConnection

friend class MySQLConnection
friend

Definition at line 34 of file MySQLPreparedStatement.h.

◆ PreparedStatementBase

friend class PreparedStatementBase
friend

Definition at line 35 of file MySQLPreparedStatement.h.

Member Data Documentation

◆ m_bind

MySQLBind* MySQLPreparedStatement::m_bind
private

Definition at line 64 of file MySQLPreparedStatement.h.

◆ m_Mstmt

MySQLStmt* MySQLPreparedStatement::m_Mstmt
private

Definition at line 61 of file MySQLPreparedStatement.h.

◆ m_paramCount

uint32 MySQLPreparedStatement::m_paramCount
private

Definition at line 62 of file MySQLPreparedStatement.h.

◆ m_paramsSet

std::vector<bool> MySQLPreparedStatement::m_paramsSet
private

Definition at line 63 of file MySQLPreparedStatement.h.

◆ m_queryString

std::string const MySQLPreparedStatement::m_queryString
private

Definition at line 65 of file MySQLPreparedStatement.h.

◆ m_stmt

PreparedStatementBase* MySQLPreparedStatement::m_stmt
protected

Definition at line 55 of file MySQLPreparedStatement.h.


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