18#ifndef _MYSQLCONNECTION_H
19#define _MYSQLCONNECTION_H
68 bool PrepareStatements();
70 bool Execute(
char const* sql);
77 void BeginTransaction();
78 void RollbackTransaction();
79 void CommitTransaction();
80 int ExecuteTransaction(std::shared_ptr<TransactionBase> transaction);
81 size_t EscapeString(
char* to,
const char* from,
size_t length);
94 uint32 GetServerVersion()
const;
107 bool _HandleMySQLErrno(
uint32 errNo,
uint8 attempts = 5);
std::vector< std::unique_ptr< MySQLPreparedStatement > > PreparedStatementContainer
ProducerConsumerQueue< SQLOperation * > * m_queue
std::unique_ptr< DatabaseWorker > m_worker
Queue shared with other asynchronous connections.
MySQLConnection & operator=(MySQLConnection const &right)=delete
MySQLConnectionInfo & m_connectionInfo
MySQL Handle.
PreparedStatementContainer m_stmts
ConnectionFlags m_connectionFlags
Connection info (used for logging)
std::mutex m_Mutex
Connection flags (for preparing relevant statements)
bool m_prepareError
Are we reconnecting?
MySQLHandle * m_Mysql
Core worker task.
virtual void DoPrepareStatements()=0
MySQLConnection(MySQLConnection const &right)=delete
bool m_reconnecting
PreparedStatements storage.
std::string port_or_socket