18#ifndef _MYSQLCONNECTION_H
19#define _MYSQLCONNECTION_H
53 friend class PingOperation;
62 bool PrepareStatements();
64 bool Execute(
char const* sql);
71 void BeginTransaction();
72 void RollbackTransaction();
73 void CommitTransaction();
74 int ExecuteTransaction(std::shared_ptr<TransactionBase> transaction);
75 size_t EscapeString(
char* to,
const char* from,
size_t length);
81 std::thread::id GetWorkerThreadId()
const;
91 uint32 GetServerVersion()
const;
104 bool _HandleMySQLErrno(
uint32 errNo,
uint8 attempts = 5);
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
std::unique_ptr< std::thread > m_workerThread
Core worker thread.
MySQLConnection(MySQLConnection const &right)=delete
bool m_reconnecting
Are we reconnecting?
std::string port_or_socket