Core/DBLayer

- Add some small documentation on prepared statement defines naming contention (placed in the 3 database implementation header files so it can´t be missed)
- Remove obsolete mutex declaration in DatabaseWorkerPool (was unused as of recently)

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-09-03 09:21:28 +02:00
parent a15c45808c
commit 387ee751a9
4 changed files with 18 additions and 1 deletions
@@ -314,7 +314,6 @@ class DatabaseWorkerPool
private: private:
ACE_Activation_Queue* m_queue; //! Queue shared by async worker threads. ACE_Activation_Queue* m_queue; //! Queue shared by async worker threads.
ACE_Thread_Mutex m_queue_mtx; //! For thread safe enqueues of delayed statements.
std::vector<T*> m_async_connections; std::vector<T*> m_async_connections;
ConnectionMap m_sync_connections; //! Holds a mysql connection+thread per mapUpdate thread and unbundled runnnables. ConnectionMap m_sync_connections; //! Holds a mysql connection+thread per mapUpdate thread and unbundled runnnables.
ACE_Thread_Mutex m_connectionMap_mtx; //! For thread safe access to the synchroneous connection map ACE_Thread_Mutex m_connectionMap_mtx; //! For thread safe access to the synchroneous connection map
@@ -37,6 +37,12 @@ typedef DatabaseWorkerPool<CharacterDatabaseConnection> CharacterDatabaseWorkerP
enum CharacterDatabaseStatements enum CharacterDatabaseStatements
{ {
/* Naming standard for defines:
{DB}_{SET/DEL/ADD/REP}_{Summary of data changed}
When updating more than one field, consider looking at the calling function
name for a suiting suffix.
*/
MAX_CHARACTERDATABASE_STATEMENTS, MAX_CHARACTERDATABASE_STATEMENTS,
}; };
@@ -37,6 +37,12 @@ typedef DatabaseWorkerPool<LoginDatabaseConnection> LoginDatabaseWorkerPool;
enum LoginDatabaseStatements enum LoginDatabaseStatements
{ {
/* Naming standard for defines:
{DB}_{SET/DEL/ADD/REP}_{Summary of data changed}
When updating more than one field, consider looking at the calling function
name for a suiting suffix.
*/
LOGIN_SET_VS, LOGIN_SET_VS,
LOGIN_SET_LOGONPROOF, LOGIN_SET_LOGONPROOF,
MAX_LOGINDATABASE_STATEMENTS, MAX_LOGINDATABASE_STATEMENTS,
@@ -37,6 +37,12 @@ typedef DatabaseWorkerPool<WorldDatabaseConnection> WorldDatabaseWorkerPool;
enum WorldDatabaseStatements enum WorldDatabaseStatements
{ {
/* Naming standard for defines:
{DB}_{SET/DEL/ADD/REP}_{Summary of data changed}
When updating more than one field, consider looking at the calling function
name for a suiting suffix.
*/
WORLD_DEL_CRESPAWNTIME, WORLD_DEL_CRESPAWNTIME,
WORLD_ADD_CRESPAWNTIME, WORLD_ADD_CRESPAWNTIME,
MAX_WORLDDATABASE_STATEMENTS, MAX_WORLDDATABASE_STATEMENTS,