1#ifndef ENGINE_SERVER_DATABASES_CONNECTION_POOL_H
2#define ENGINE_SERVER_DATABASES_CONNECTION_POOL_H
25 ISqlData(std::shared_ptr<ISqlResult> pResult) :
86 std::unique_ptr<const ISqlData> pSqlRequestData,
92 std::unique_ptr<const ISqlData> pSqlRequestData,
Definition: connection_pool.cpp:188
Definition: connection_pool.h:61
void RegisterSqliteDatabase(Mode DatabaseMode, const char FileName[64])
Definition: connection_pool.cpp:128
Mode
Definition: connection_pool.h:72
@ NUM_MODES
Definition: connection_pool.h:76
@ READ
Definition: connection_pool.h:73
@ WRITE_BACKUP
Definition: connection_pool.h:75
@ WRITE
Definition: connection_pool.h:74
CDbConnectionPool & operator=(const CDbConnectionPool &)=delete
int m_InsertIdx
Definition: connection_pool.h:105
void * m_pBackupThread
Definition: connection_pool.h:130
void * m_pWorkerThread
Definition: connection_pool.h:129
std::shared_ptr< CSharedData > m_pShared
Definition: connection_pool.h:128
~CDbConnectionPool()
Definition: connection_pool.cpp:483
bool m_Shutdown
Definition: connection_pool.h:107
void Execute(FRead pFunc, std::unique_ptr< const ISqlData > pSqlRequestData, const char *pName)
Definition: connection_pool.cpp:142
CDbConnectionPool()
Definition: connection_pool.cpp:476
void ExecuteWrite(FWrite pFunc, std::unique_ptr< const ISqlData > pSqlRequestData, const char *pName)
Definition: connection_pool.cpp:152
static bool ExecSqlFunc(IDbConnection *pConnection, struct CSqlExecData *pData, Write w)
Definition: connection_pool.cpp:443
void Print(IConsole *pConsole, Mode DatabaseMode)
Definition: connection_pool.cpp:121
bool(* FWrite)(IDbConnection *, const ISqlData *, Write, char *pError, int ErrorSize)
Definition: connection_pool.h:69
bool(* FRead)(IDbConnection *, const ISqlData *, char *pError, int ErrorSize)
Definition: connection_pool.h:68
void RegisterMysqlDatabase(Mode DatabaseMode, const CMysqlConfig *pMysqlConfig)
Definition: connection_pool.cpp:135
void OnShutdown()
Definition: connection_pool.cpp:162
Definition: threading.h:8
Definition: connection_pool.cpp:246
Definition: connection.h:19
Write
Definition: connection_pool.h:35
@ NORMAL_FAILED
Definition: connection_pool.h:43
@ NORMAL
Definition: connection_pool.h:39
@ BACKUP_FIRST
Definition: connection_pool.h:37
@ NORMAL_SUCCEEDED
Definition: connection_pool.h:41
Definition: connection_pool.h:110
std::unique_ptr< struct CSqlExecData > m_aQueries[512]
Definition: connection_pool.h:125
std::atomic_bool m_Shutdown
Definition: connection_pool.h:116
CSemaphore m_NumBackup
Definition: connection_pool.h:119
CSemaphore m_NumWorker
Definition: connection_pool.h:122
Definition: connection_pool.h:49
char m_aPass[64]
Definition: connection_pool.h:53
bool m_Setup
Definition: connection_pool.h:57
char m_aDatabase[64]
Definition: connection_pool.h:50
char m_aPrefix[64]
Definition: connection_pool.h:51
char m_aIp[64]
Definition: connection_pool.h:54
char m_aBindaddr[128]
Definition: connection_pool.h:55
char m_aUser[64]
Definition: connection_pool.h:52
int m_Port
Definition: connection_pool.h:56
Definition: connection_pool.cpp:19
Definition: connection_pool.h:24
virtual ~ISqlData()=default
std::shared_ptr< ISqlResult > m_pResult
Definition: connection_pool.h:31
ISqlData(std::shared_ptr< ISqlResult > pResult)
Definition: connection_pool.h:25
Definition: connection_pool.h:12
std::atomic_bool m_Completed
Definition: connection_pool.h:16
virtual ~ISqlResult()=default
bool m_Success
Definition: connection_pool.h:18