OregonCore  revision 3611e8a-git
Your Favourite TBC server
DatabaseImpl.h File Reference

Go to the source code of this file.

Macros

#define ASYNC_QUERY_BODY(sql, queue_itr)
 
#define ASYNC_PQUERY_BODY(format, szQuery)
 
#define ASYNC_DELAYHOLDER_BODY(holder, queue_itr)
 

Macro Definition Documentation

#define ASYNC_DELAYHOLDER_BODY (   holder,
  queue_itr 
)
Value:
if (!holder) return false; \
\
QueryQueues::iterator queue_itr; \
\
{ \
ACE_Based::Thread * queryThread = ACE_Based::Thread::current(); \
queue_itr = m_queryQueues.find(queryThread); \
if (queue_itr == m_queryQueues.end()) return false; \
}
static Thread * current()
Definition: Threading.cpp:212

Definition at line 53 of file DatabaseImpl.h.

Referenced by Database::DelayQueryHolder().

#define ASYNC_PQUERY_BODY (   format,
  szQuery 
)
Value:
if (!format) return false; \
\
char szQuery [MAX_QUERY_LEN]; \
\
{ \
va_list ap; \
\
va_start(ap, format); \
int res = vsnprintf( szQuery, MAX_QUERY_LEN, format, ap ); \
va_end(ap); \
\
if (res==-1) \
{ \
sLog.outError("SQL Query truncated (and not execute) for format: %s",format); \
return false; \
} \
}
#define vsnprintf
Definition: Common.h:131
#define MAX_QUERY_LEN
Definition: Database.h:44

Definition at line 34 of file DatabaseImpl.h.

Referenced by Database::AsyncPQuery().

#define ASYNC_QUERY_BODY (   sql,
  queue_itr 
)
Value:
if (!sql) return false; \
\
QueryQueues::iterator queue_itr; \
\
{ \
ACE_Based::Thread * queryThread = ACE_Based::Thread::current(); \
queue_itr = m_queryQueues.find(queryThread); \
if (queue_itr == m_queryQueues.end()) return false; \
}
static Thread * current()
Definition: Threading.cpp:212

Definition at line 23 of file DatabaseImpl.h.

Referenced by Database::AsyncQuery().