mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[11063] Convert Database::DirectExecute() method to more effective form due to change [11061].
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
a3315d0a11
commit
49810598c6
3 changed files with 10 additions and 14 deletions
|
|
@ -309,18 +309,6 @@ bool Database::PExecute(const char * format,...)
|
|||
return Execute(szQuery);
|
||||
}
|
||||
|
||||
bool Database::DirectExecute(const char* sql)
|
||||
{
|
||||
if(!m_pAsyncConn)
|
||||
return false;
|
||||
|
||||
SqlTransaction trans;
|
||||
trans.DelayExecute(sql);
|
||||
|
||||
trans.Execute(m_pAsyncConn);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Database::DirectPExecute(const char * format,...)
|
||||
{
|
||||
if (!format)
|
||||
|
|
|
|||
|
|
@ -102,7 +102,15 @@ class MANGOS_DLL_SPEC Database
|
|||
QueryResult* PQuery(const char *format,...) ATTR_PRINTF(2,3);
|
||||
QueryNamedResult* PQueryNamed(const char *format,...) ATTR_PRINTF(2,3);
|
||||
|
||||
bool DirectExecute(const char* sql);
|
||||
inline bool DirectExecute(const char* sql)
|
||||
{
|
||||
if(!m_pAsyncConn)
|
||||
return false;
|
||||
|
||||
SqlConnection::Lock guard(m_pAsyncConn);
|
||||
return guard->Execute(sql);
|
||||
}
|
||||
|
||||
bool DirectPExecute(const char *format,...) ATTR_PRINTF(2,3);
|
||||
|
||||
/// Async queries and query holders, implemented in DatabaseImpl.h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11062"
|
||||
#define REVISION_NR "11063"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue