TrinityCore
SQLQueryHolderBase Class Reference

#include <QueryHolder.h>

+ Inheritance diagram for SQLQueryHolderBase:

Public Member Functions

 SQLQueryHolderBase ()=default
 
virtual ~SQLQueryHolderBase ()
 
void SetSize (size_t size)
 
PreparedQueryResult GetPreparedResult (size_t index) const
 
void SetPreparedResult (size_t index, PreparedResultSet *result)
 

Protected Member Functions

bool SetPreparedQueryImpl (size_t index, PreparedStatementBase *stmt)
 

Private Attributes

std::vector< std::pair< PreparedStatementBase *, PreparedQueryResult > > m_queries
 

Friends

class SQLQueryHolderTask
 

Detailed Description

Definition at line 27 of file QueryHolder.h.

Constructor & Destructor Documentation

◆ SQLQueryHolderBase()

SQLQueryHolderBase::SQLQueryHolderBase ( )
default

◆ ~SQLQueryHolderBase()

SQLQueryHolderBase::~SQLQueryHolderBase ( )
virtual

if the result was never used, free the resources results used already (getresult called) are expected to be deleted

Definition at line 59 of file QueryHolder.cpp.

Member Function Documentation

◆ GetPreparedResult()

PreparedQueryResult SQLQueryHolderBase::GetPreparedResult ( size_t  index) const

Definition at line 37 of file QueryHolder.cpp.

+ Here is the caller graph for this function:

◆ SetPreparedQueryImpl()

bool SQLQueryHolderBase::SetPreparedQueryImpl ( size_t  index,
PreparedStatementBase stmt 
)
protected

Definition at line 25 of file QueryHolder.cpp.

+ Here is the caller graph for this function:

◆ SetPreparedResult()

void SQLQueryHolderBase::SetPreparedResult ( size_t  index,
PreparedResultSet result 
)

store the result in the holder

Definition at line 46 of file QueryHolder.cpp.

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

◆ SetSize()

void SQLQueryHolderBase::SetSize ( size_t  size)

to optimize push_back, reserve the number of queries about to be executed

Definition at line 69 of file QueryHolder.cpp.

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

Friends And Related Function Documentation

◆ SQLQueryHolderTask

friend class SQLQueryHolderTask
friend

Definition at line 29 of file QueryHolder.h.

Member Data Documentation

◆ m_queries

std::vector<std::pair<PreparedStatementBase*, PreparedQueryResult> > SQLQueryHolderBase::m_queries
private

Definition at line 31 of file QueryHolder.h.


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