#include <QueryHolder.h>
SQLQueryHolder::SQLQueryHolder |
( |
| ) |
|
|
inline |
SQLQueryHolder::~SQLQueryHolder |
( |
| ) |
|
|
virtual |
if the result was never used, free the resources results used already (getresult called) are expected to be deleted
121 for (
size_t i = 0; i <
m_queries.size(); i++)
130 free((
void*)(const_cast<char*>(data->element.query)));
133 delete data->element.stmt;
Definition: SQLOperation.h:36
std::vector< SQLResultPair > m_queries
Definition: QueryHolder.h:28
Definition: SQLOperation.h:41
Definition: SQLOperation.h:37
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: QueryResult.h:107
std::vector< SQLResultPair > m_queries
Definition: QueryHolder.h:28
arena_t NULL
Definition: jemalloc_internal.h:624
uint64 GetRowCount() const
Definition: QueryResult.h:70
Definition: QueryResult.h:63
bool NextRow()
Definition: QueryResult.cpp:176
std::vector< SQLResultPair > m_queries
Definition: QueryHolder.h:28
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: QueryResult.h:30
uint64 GetRowCount() const
Definition: QueryResult.h:37
std::shared_ptr< ResultSet > QueryResult
Definition: QueryResult.h:61
template<typename Format , typename... Args>
bool SQLQueryHolder::SetPQuery |
( |
size_t |
index, |
|
|
Format && |
sql, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
bool SetQuery(size_t index, const char *sql)
Definition: QueryHolder.cpp:23
std::string StringFormat(Format &&fmt, Args &&...args)
Default TC string format function.
Definition: StringFormat.h:28
not executed yet, just stored (it's not called a holder for nothing)
PreparedResultSet * presult
Definition: SQLOperation.h:50
std::vector< SQLResultPair > m_queries
Definition: QueryHolder.h:28
std::pair< SQLElementData, SQLResultSetUnion > SQLResultPair
Definition: QueryHolder.h:27
arena_t NULL
Definition: jemalloc_internal.h:624
PreparedStatement * stmt
Definition: SQLOperation.h:29
Definition: SQLOperation.h:48
uint32_t uint32
Definition: Define.h:150
SQLElementDataType type
Definition: SQLOperation.h:44
Definition: SQLOperation.h:41
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
uint32_t uint32
Definition: g3dmath.h:168
SQLElementUnion element
Definition: SQLOperation.h:43
Definition: SQLOperation.h:37
store the result in the holder
116 m_queries[index].second.presult = result;
std::vector< SQLResultPair > m_queries
Definition: QueryHolder.h:28
arena_t NULL
Definition: jemalloc_internal.h:624
uint64 GetRowCount() const
Definition: QueryResult.h:70
bool SQLQueryHolder::SetQuery |
( |
size_t |
index, |
|
|
const char * |
sql |
|
) |
| |
not executed yet, just stored (it's not called a holder for nothing)
Definition: SQLOperation.h:36
ResultSet * qresult
Definition: SQLOperation.h:51
std::vector< SQLResultPair > m_queries
Definition: QueryHolder.h:28
std::pair< SQLElementData, SQLResultSetUnion > SQLResultPair
Definition: QueryHolder.h:27
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: SQLOperation.h:48
const char * query
Definition: SQLOperation.h:30
uint32_t uint32
Definition: Define.h:150
SQLElementDataType type
Definition: SQLOperation.h:44
Definition: SQLOperation.h:41
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
uint32_t uint32
Definition: g3dmath.h:168
SQLElementUnion element
Definition: SQLOperation.h:43
void SQLQueryHolder::SetResult |
( |
size_t |
index, |
|
|
ResultSet * |
result |
|
) |
| |
store the result in the holder
103 m_queries[index].second.qresult = result;
std::vector< SQLResultPair > m_queries
Definition: QueryHolder.h:28
arena_t NULL
Definition: jemalloc_internal.h:624
uint64 GetRowCount() const
Definition: QueryResult.h:37
void SQLQueryHolder::SetSize |
( |
size_t |
size | ) |
|
to optimize push_back, reserve the number of queries about to be executed
std::vector< SQLResultPair > m_queries
Definition: QueryHolder.h:28
The documentation for this class was generated from the following files: