mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[6920] Cleaned up DatabaseImpl and added support for async queries with 3 parameters passed to the callback.
This commit is contained in:
parent
162ca267f1
commit
5ba3796480
6 changed files with 126 additions and 117 deletions
|
|
@ -79,15 +79,16 @@ void SqlResultQueue::Update()
|
|||
}
|
||||
}
|
||||
|
||||
void SqlQueryHolder::Execute(MaNGOS::IQueryCallback * callback, SqlDelayThread *thread, SqlResultQueue *queue)
|
||||
bool SqlQueryHolder::Execute(MaNGOS::IQueryCallback * callback, SqlDelayThread *thread, SqlResultQueue *queue)
|
||||
{
|
||||
if(!callback || !thread || !queue)
|
||||
return;
|
||||
return false;
|
||||
|
||||
/// delay the execution of the queries, sync them with the delay thread
|
||||
/// which will in turn resync on execution (via the queue) and call back
|
||||
SqlQueryHolderEx *holderEx = new SqlQueryHolderEx(this, callback, queue);
|
||||
thread->Delay(holderEx);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SqlQueryHolder::SetQuery(size_t index, const char *sql)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue