18 #ifndef _QUERYHOLDER_H
19 #define _QUERYHOLDER_H
32 bool SetQuery(
size_t index,
const char* sql);
33 template<
typename Format,
typename... Args>
34 bool SetPQuery(
size_t index, Format&& sql, Args&&... args)
36 return SetQuery(index,
Trinity::StringFormat(std::forward<Format>(sql), std::forward<Args>(args)...).c_str());
39 void SetSize(
size_t size);
42 void SetResult(
size_t index,
ResultSet* result);
58 : m_holder(holder), m_executed(
false) { }
bool m_executed
Definition: QueryHolder.h:54
#define TC_DATABASE_API
Definition: Define.h:122
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: QueryResult.h:107
QueryResultHolderPromise m_result
Definition: QueryHolder.h:53
std::vector< SQLResultPair > m_queries
Definition: QueryHolder.h:28
Definition: QueryHolder.h:23
std::pair< SQLElementData, SQLResultSetUnion > SQLResultPair
Definition: QueryHolder.h:27
#define false
Definition: CascPort.h:18
Definition: PreparedStatement.h:74
std::future< SQLQueryHolder * > QueryResultHolderFuture
Definition: QueryHolder.h:46
Definition: QueryResult.h:30
SQLQueryHolder()
Definition: QueryHolder.h:30
Definition: QueryHolder.h:49
SQLQueryHolderTask(SQLQueryHolder *holder)
Definition: QueryHolder.h:57
std::shared_ptr< ResultSet > QueryResult
Definition: QueryResult.h:61
std::promise< SQLQueryHolder * > QueryResultHolderPromise
Definition: QueryHolder.h:47
std::string StringFormat(Format &&fmt, Args &&...args)
Default TC string format function.
Definition: StringFormat.h:28
SQLQueryHolder * m_holder
Definition: QueryHolder.h:52
Definition: SQLOperation.h:56
QueryResultHolderFuture GetFuture()
Definition: QueryHolder.h:63
Definition: QueryResult.h:63
bool SetPQuery(size_t index, Format &&sql, Args &&...args)
Definition: QueryHolder.h:34