mirror of
https://github.com/mangosfour/server.git
synced 2026-01-02 01:37:05 +00:00
Apply style fix pt3
This commit is contained in:
parent
1392c131e7
commit
d93dbd95fe
191 changed files with 9851 additions and 676 deletions
|
|
@ -96,7 +96,9 @@ SqlPreparedStatement* SqlConnection::GetStmt(uint32 nIndex)
|
|||
m_holder[nIndex] = pStmt;
|
||||
}
|
||||
else
|
||||
{ pStmt = m_holder[nIndex]; }
|
||||
{
|
||||
pStmt = m_holder[nIndex];
|
||||
}
|
||||
|
||||
return pStmt;
|
||||
}
|
||||
|
|
@ -146,9 +148,13 @@ bool Database::Initialize(const char* infoString, int nConns /*= 1*/)
|
|||
m_nQueryConnPoolSize = MIN_CONNECTION_POOL_SIZE;
|
||||
}
|
||||
else if (nConns > MAX_CONNECTION_POOL_SIZE)
|
||||
{ m_nQueryConnPoolSize = MAX_CONNECTION_POOL_SIZE; }
|
||||
{
|
||||
m_nQueryConnPoolSize = MAX_CONNECTION_POOL_SIZE;
|
||||
}
|
||||
else
|
||||
{ m_nQueryConnPoolSize = nConns; }
|
||||
{
|
||||
m_nQueryConnPoolSize = nConns;
|
||||
}
|
||||
|
||||
// create connection pool for sync requests
|
||||
for (int i = 0; i < m_nQueryConnPoolSize; ++i)
|
||||
|
|
@ -263,7 +269,9 @@ SqlConnection* Database::getQueryConnection()
|
|||
m_nQueryCounter = 0;
|
||||
}
|
||||
else
|
||||
{ nCount = ++m_nQueryCounter; }
|
||||
{
|
||||
nCount = ++m_nQueryCounter;
|
||||
}
|
||||
|
||||
return m_pQueryConnections[nCount % m_nQueryConnPoolSize];
|
||||
}
|
||||
|
|
@ -658,7 +666,9 @@ SqlStatement Database::CreateStatement(SqlStatementID& index, const char* fmt)
|
|||
m_stmtRegistry[szFmt] = nId;
|
||||
}
|
||||
else
|
||||
{ nId = iter->second; }
|
||||
{
|
||||
nId = iter->second;
|
||||
}
|
||||
|
||||
// save initialized statement index info
|
||||
index.init(nId, nParams);
|
||||
|
|
|
|||
|
|
@ -184,7 +184,9 @@ bool MySQLConnection::Initialize(const char* infoString)
|
|||
DETAIL_LOG("AUTOCOMMIT SUCCESSFULLY SET TO 1");
|
||||
}
|
||||
else
|
||||
{ DETAIL_LOG("AUTOCOMMIT NOT SET TO 1"); }
|
||||
{
|
||||
DETAIL_LOG("AUTOCOMMIT NOT SET TO 1");
|
||||
}
|
||||
/*-------------------------------------*/
|
||||
|
||||
// set connection properties to UTF8 to properly handle locales for different
|
||||
|
|
|
|||
|
|
@ -97,7 +97,9 @@ bool PostgreSQLConnection::Initialize(const char* infoString)
|
|||
mPGconn = PQsetdbLogin(NULL, port_or_socket_dir == "." ? NULL : port_or_socket_dir.c_str(), NULL, NULL, database.c_str(), user.c_str(), password.c_str());
|
||||
}
|
||||
else
|
||||
{ mPGconn = PQsetdbLogin(host.c_str(), port_or_socket_dir.c_str(), NULL, NULL, database.c_str(), user.c_str(), password.c_str()); }
|
||||
{
|
||||
mPGconn = PQsetdbLogin(host.c_str(), port_or_socket_dir.c_str(), NULL, NULL, database.c_str(), user.c_str(), password.c_str());
|
||||
}
|
||||
|
||||
/* check to see that the backend connection was successfully made */
|
||||
if (PQstatus(mPGconn) != CONNECTION_OK)
|
||||
|
|
|
|||
|
|
@ -270,7 +270,9 @@ void SQLStorageLoaderBase<DerivedLoader, StorageClass>::Load(StorageClass& store
|
|||
sLog.outError("%s table is empty!\n", store.GetTableName());
|
||||
}
|
||||
else
|
||||
{ sLog.outString("%s table is empty!\n", store.GetTableName()); }
|
||||
{
|
||||
sLog.outString("%s table is empty!\n", store.GetTableName());
|
||||
}
|
||||
|
||||
recordCount = 0;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -188,7 +188,9 @@ QueryResult* SqlQueryHolder::GetResult(size_t index)
|
|||
return m_queries[index].second;
|
||||
}
|
||||
else
|
||||
{ return NULL; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void SqlQueryHolder::SetResult(size_t index, QueryResult* result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue