[6920] Cleaned up DatabaseImpl and added support for async queries with 3 parameters passed to the callback.

This commit is contained in:
Wyk3d 2008-12-19 15:50:58 +02:00
parent 162ca267f1
commit 5ba3796480
6 changed files with 126 additions and 117 deletions

View file

@ -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)