mirror of
https://github.com/mangosfour/server.git
synced 2025-12-23 07:37:01 +00:00
[11292] Strip trailing whitespace after [11284]
This commit is contained in:
parent
443b5c776c
commit
37fd225a89
12 changed files with 26 additions and 28 deletions
|
|
@ -171,7 +171,7 @@ void Database::StopServer()
|
|||
}
|
||||
|
||||
SqlDelayThread * Database::CreateDelayThread()
|
||||
{
|
||||
{
|
||||
assert(m_pAsyncConn);
|
||||
return new SqlDelayThread(this, m_pAsyncConn);
|
||||
}
|
||||
|
|
@ -608,7 +608,7 @@ SqlStatement Database::CreateStatement(SqlStatementID& index, const char * fmt )
|
|||
std::string Database::GetStmtString(const int stmtId) const
|
||||
{
|
||||
LOCK_GUARD _guard(m_stmtGuard);
|
||||
|
||||
|
||||
if(stmtId == -1 || stmtId > m_iStmtIndex)
|
||||
return std::string();
|
||||
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ class MANGOS_DLL_SPEC Database
|
|||
void AllowAsyncTransactions() { m_bAllowAsyncTransactions = true; }
|
||||
|
||||
protected:
|
||||
Database() : m_pAsyncConn(NULL), m_pResultQueue(NULL), m_threadBody(NULL), m_delayThread(NULL),
|
||||
Database() : m_pAsyncConn(NULL), m_pResultQueue(NULL), m_threadBody(NULL), m_delayThread(NULL),
|
||||
m_logSQL(false), m_pingIntervallms(0), m_nQueryConnPoolSize(1), m_bAllowAsyncTransactions(false), m_iStmtIndex(-1)
|
||||
{
|
||||
m_nQueryCounter = -1;
|
||||
|
|
@ -243,7 +243,7 @@ class MANGOS_DLL_SPEC Database
|
|||
|
||||
//initializes new SqlTransaction object
|
||||
SqlTransaction * init();
|
||||
//gets pointer on current transaction object. Returns NULL if transaction was not initiated
|
||||
//gets pointer on current transaction object. Returns NULL if transaction was not initiated
|
||||
SqlTransaction * get() const { return m_pTrans; }
|
||||
//detaches SqlTransaction object allocated by init() function
|
||||
//next call to get() function will return NULL!
|
||||
|
|
@ -297,7 +297,7 @@ class MANGOS_DLL_SPEC Database
|
|||
mutable LOCK_TYPE m_stmtGuard;
|
||||
|
||||
typedef UNORDERED_MAP<std::string, int> PreparedStmtRegistry;
|
||||
PreparedStmtRegistry m_stmtRegistry; ///<
|
||||
PreparedStmtRegistry m_stmtRegistry; ///<
|
||||
|
||||
int m_iStmtIndex;
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ DatabaseMysql::~DatabaseMysql()
|
|||
}
|
||||
|
||||
SqlConnection * DatabaseMysql::CreateConnection()
|
||||
{
|
||||
{
|
||||
return new MySQLConnection(*this);
|
||||
}
|
||||
|
||||
|
|
@ -318,7 +318,7 @@ SqlPreparedStatement * MySQLConnection::CreateStatement( const std::string& fmt
|
|||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
MySqlPreparedStatement::MySqlPreparedStatement( const std::string& fmt, SqlConnection& conn, MYSQL * mysql ) : SqlPreparedStatement(fmt, conn),
|
||||
MySqlPreparedStatement::MySqlPreparedStatement( const std::string& fmt, SqlConnection& conn, MYSQL * mysql ) : SqlPreparedStatement(fmt, conn),
|
||||
m_pMySQLConn(mysql), m_stmt(NULL), m_pInputArgs(NULL), m_pResult(NULL), m_pResultMetadata(NULL)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class SqlPreparedRequest : public SqlOperation
|
|||
public:
|
||||
SqlPreparedRequest(int nIndex, SqlStmtParameters * arg);
|
||||
~SqlPreparedRequest();
|
||||
|
||||
|
||||
bool Execute(SqlConnection *conn);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ bool SqlPlainPreparedStatement::execute()
|
|||
}
|
||||
|
||||
void SqlPlainPreparedStatement::DataToString( const SqlStmtFieldData& data, std::ostringstream& fmt )
|
||||
{
|
||||
{
|
||||
switch (data.type())
|
||||
{
|
||||
case FIELD_BOOL: fmt << "'" << uint32(data.toBool()) << "'"; break;
|
||||
|
|
@ -153,8 +153,8 @@ void SqlPlainPreparedStatement::DataToString( const SqlStmtFieldData& data, std:
|
|||
{
|
||||
std::string tmp = data.toStr();
|
||||
m_pConn.DB().escape_string(tmp);
|
||||
fmt << "'" << tmp << "'";
|
||||
fmt << "'" << tmp << "'";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ class MANGOS_DLL_SPEC SqlStmtParameters
|
|||
|
||||
//get amount of bound parameters
|
||||
int boundParams() const { return int(m_params.size()); }
|
||||
//add parameter
|
||||
//add parameter
|
||||
void addParam(const SqlStmtFieldData& data) { m_params.push_back(data); }
|
||||
//empty SQL statement parameters. In case nParams > 1 - reserve memory for parameters
|
||||
//should help to reuse the same object with batched SQL requests
|
||||
|
|
@ -348,5 +348,3 @@ class MANGOS_DLL_SPEC SqlPlainPreparedStatement : public SqlPreparedStatement
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue