mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[Rel21] Stage 1 of updates for Rel21 Build System
This commit is contained in:
parent
13292befd6
commit
fdefc0869a
1951 changed files with 40474 additions and 252610 deletions
|
|
@ -50,7 +50,7 @@ SqlTransaction::~SqlTransaction()
|
|||
bool SqlTransaction::Execute(SqlConnection* conn)
|
||||
{
|
||||
if (m_queue.empty())
|
||||
return true;
|
||||
{ return true; }
|
||||
|
||||
LOCK_DB_CONN(conn);
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ bool SqlPreparedRequest::Execute(SqlConnection* conn)
|
|||
bool SqlQuery::Execute(SqlConnection* conn)
|
||||
{
|
||||
if (!m_callback || !m_queue)
|
||||
return false;
|
||||
{ return false; }
|
||||
|
||||
LOCK_DB_CONN(conn);
|
||||
/// execute the query and store the result in the callback
|
||||
|
|
@ -116,7 +116,7 @@ void SqlResultQueue::Update()
|
|||
bool SqlQueryHolder::Execute(MaNGOS::IQueryCallback* callback, SqlDelayThread* thread, SqlResultQueue* queue)
|
||||
{
|
||||
if (!callback || !thread || !queue)
|
||||
return false;
|
||||
{ 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
|
||||
|
|
@ -182,14 +182,14 @@ QueryResult* SqlQueryHolder::GetResult(size_t index)
|
|||
return m_queries[index].second;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
{ return NULL; }
|
||||
}
|
||||
|
||||
void SqlQueryHolder::SetResult(size_t index, QueryResult* result)
|
||||
{
|
||||
/// store the result in the holder
|
||||
if (index < m_queries.size())
|
||||
m_queries[index].second = result;
|
||||
{ m_queries[index].second = result; }
|
||||
}
|
||||
|
||||
SqlQueryHolder::~SqlQueryHolder()
|
||||
|
|
@ -215,7 +215,7 @@ void SqlQueryHolder::SetSize(size_t size)
|
|||
bool SqlQueryHolderEx::Execute(SqlConnection* conn)
|
||||
{
|
||||
if (!m_holder || !m_callback || !m_queue)
|
||||
return false;
|
||||
{ return false; }
|
||||
|
||||
LOCK_DB_CONN(conn);
|
||||
/// we can do this, we are friends
|
||||
|
|
@ -224,7 +224,7 @@ bool SqlQueryHolderEx::Execute(SqlConnection* conn)
|
|||
{
|
||||
/// execute all queries in the holder and pass the results
|
||||
char const* sql = queries[i].first;
|
||||
if (sql) m_holder->SetResult(i, conn->Query(sql));
|
||||
if (sql) { m_holder->SetResult(i, conn->Query(sql)); }
|
||||
}
|
||||
|
||||
/// sync with the caller thread
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue