18#ifndef _MYSQLCONNECTION_H
19#define _MYSQLCONNECTION_H
54 friend class PingOperation;
63 bool PrepareStatements();
72 void BeginTransaction();
73 void RollbackTransaction();
74 void CommitTransaction();
75 int ExecuteTransaction(std::shared_ptr<TransactionBase> transaction);
76 size_t EscapeString(
char* to,
const char* from,
size_t length);
82 std::thread::id GetWorkerThreadId()
const;
92 uint32 GetServerVersion()
const;
105 bool _HandleMySQLErrno(
uint32 errNo,
uint8 attempts = 5);
std::unique_ptr< WorkerThread > m_workerThread
Core worker thread.
std::vector< std::unique_ptr< MySQLPreparedStatement > > PreparedStatementContainer
MySQLConnection & operator=(MySQLConnection const &right)=delete
MySQLConnectionInfo & m_connectionInfo
Connection info (used for logging)
PreparedStatementContainer m_stmts
PreparedStatements storage.
ConnectionFlags m_connectionFlags
Connection flags (for preparing relevant statements)
bool m_prepareError
Was there any error while preparing statements?
MySQLHandle * m_Mysql
MySQL Handle.
virtual void DoPrepareStatements()=0
MySQLConnection(MySQLConnection const &right)=delete
bool m_reconnecting
Are we reconnecting?
void Execute(Creature *me, EventMap &events, uint32 eventId)
std::string port_or_socket