29 #define CALLBACK_STAGE_INVALID uint8(-1)
31 template <
typename Result,
typename ParamType,
bool chain = false>
114 template <
typename Result,
typename ParamType1,
typename ParamType2,
bool chain = false>
QueryCallback()
Definition: Callback.h:35
uint8 GetStage()
Returns the callback stage (or CALLBACK_STAGE_INVALID if invalid)
Definition: Callback.h:185
std::future< QueryResult > QueryResultFuture
Definition: Callback.h:24
std::future< Result > _result
Definition: Callback.h:200
void SetParam(ParamType value)
Definition: Callback.h:63
void SetFirstParam(ParamType1 value)
Definition: Callback.h:146
bool IsReady()
Definition: Callback.h:131
QueryCallback_2()
Definition: Callback.h:118
ParamType1 GetFirstParam()
Definition: Callback.h:156
void GetResult(Result &res)
Definition: Callback.h:53
ParamType2 _param_2
Definition: Callback.h:202
void FreeResult()
Definition: Callback.h:141
QueryCallback_2 & operator=(QueryCallback_2 const &right)=delete
void NextStage()
Advances the callback chain to the next stage, so upper level code can act on its results accordingly...
Definition: Callback.h:176
arena_t NULL
Definition: jemalloc_internal.h:624
uint8 _stage
Definition: Callback.h:108
void ResetStage()
Resets the stage of the callback chain.
Definition: Callback.h:167
float seconds()
Definition: units.h:97
std::promise< QueryResult > QueryResultPromise
Definition: Callback.h:25
ParamType GetParam()
Definition: Callback.h:68
QueryCallback & operator=(QueryCallback const &right)=delete
Definition: Callback.h:32
void GetResult(Result &res)
Definition: Callback.h:136
ParamType1 _param_1
Definition: Callback.h:201
std::future< Result > & GetFutureResult()
Definition: Callback.h:43
void ResetStage()
Resets the stage of the callback chain.
Definition: Callback.h:74
void SetFutureResult(std::future< Result > value)
The parameter of this function should be a resultset returned from either .AsyncQuery or ...
Definition: Callback.h:121
std::promise< PreparedQueryResult > PreparedQueryResultPromise
Definition: Callback.h:27
void SetSecondParam(ParamType2 value)
Definition: Callback.h:151
uint8 _stage
Definition: Callback.h:203
ParamType _param
Definition: Callback.h:107
void NextStage()
Advances the callback chain to the next stage, so upper level code can act on its results accordingly...
Definition: Callback.h:83
uint8 GetStage()
Returns the callback stage (or CALLBACK_STAGE_INVALID if invalid)
Definition: Callback.h:92
Definition: Callback.h:115
std::future< PreparedQueryResult > PreparedQueryResultFuture
Definition: Callback.h:26
ParamType2 GetSecondParam()
Definition: Callback.h:161
void Reset()
Resets all underlying variables (param, result and stage)
Definition: Callback.h:98
void Reset()
Resets all underlying variables (param, result and stage)
Definition: Callback.h:191
uint8_t uint8
Definition: Define.h:152
const FieldDescriptor value
Definition: descriptor.h:1522
std::future< Result > & GetFutureResult()
Definition: Callback.h:126
void SetFutureResult(std::future< Result > value)
The parameter of this function should be a resultset returned from either .AsyncQuery or ...
Definition: Callback.h:38
#define CALLBACK_STAGE_INVALID
Definition: Callback.h:29
void FreeResult()
Definition: Callback.h:58
std::future< Result > _result
Definition: Callback.h:106
bool IsReady()
Definition: Callback.h:48