#include <MySQLConnection.h>
|
| MySQLConnection (MySQLConnectionInfo &connInfo, ConnectionFlags connectionFlags) |
|
virtual | ~MySQLConnection () |
|
uint32 | Open () |
|
void | Close () |
|
bool | PrepareStatements () |
|
bool | Execute (char const *sql) |
|
bool | Execute (PreparedStatementBase *stmt) |
|
ResultSet * | Query (char const *sql) |
|
PreparedResultSet * | Query (PreparedStatementBase *stmt) |
|
bool | _Query (char const *sql, MySQLResult **pResult, MySQLField **pFields, uint64 *pRowCount, uint32 *pFieldCount) |
|
bool | _Query (PreparedStatementBase *stmt, MySQLPreparedStatement **mysqlStmt, MySQLResult **pResult, uint64 *pRowCount, uint32 *pFieldCount) |
|
void | BeginTransaction () |
|
void | RollbackTransaction () |
|
void | CommitTransaction () |
|
int | ExecuteTransaction (std::shared_ptr< TransactionBase > transaction) |
|
size_t | EscapeString (char *to, const char *from, size_t length) |
|
void | Ping () |
|
uint32 | GetLastError () |
|
void | StartWorkerThread (Trinity::Asio::IoContext *context) |
|
std::thread::id | GetWorkerThreadId () const |
|
Definition at line 51 of file MySQLConnection.h.
◆ PreparedStatementContainer
◆ MySQLConnection() [1/2]
◆ ~MySQLConnection()
MySQLConnection::~MySQLConnection |
( |
| ) |
|
|
virtual |
◆ MySQLConnection() [2/2]
◆ _HandleMySQLErrno()
bool MySQLConnection::_HandleMySQLErrno |
( |
uint32 |
errNo, |
|
|
uint8 |
attempts = 5 |
|
) |
| |
|
private |
◆ _Query() [1/2]
◆ _Query() [2/2]
◆ BeginTransaction()
void MySQLConnection::BeginTransaction |
( |
| ) |
|
◆ Close()
void MySQLConnection::Close |
( |
| ) |
|
◆ CommitTransaction()
void MySQLConnection::CommitTransaction |
( |
| ) |
|
◆ DoPrepareStatements()
virtual void MySQLConnection::DoPrepareStatements |
( |
| ) |
|
|
protectedpure virtual |
◆ EscapeString()
size_t MySQLConnection::EscapeString |
( |
char * |
to, |
|
|
const char * |
from, |
|
|
size_t |
length |
|
) |
| |
◆ Execute() [1/2]
bool MySQLConnection::Execute |
( |
char const * |
sql | ) |
|
◆ Execute() [2/2]
◆ ExecuteTransaction()
int MySQLConnection::ExecuteTransaction |
( |
std::shared_ptr< TransactionBase > |
transaction | ) |
|
◆ GetLastError()
uint32 MySQLConnection::GetLastError |
( |
| ) |
|
◆ GetPreparedStatement()
◆ GetServerVersion()
uint32 MySQLConnection::GetServerVersion |
( |
| ) |
const |
|
protected |
◆ GetWorkerThreadId()
std::thread::id MySQLConnection::GetWorkerThreadId |
( |
| ) |
const |
◆ LockIfReady()
bool MySQLConnection::LockIfReady |
( |
| ) |
|
|
protected |
Tries to acquire lock. If lock is acquired by another thread the calling parent will just try another connection
Definition at line 469 of file MySQLConnection.cpp.
◆ Open()
uint32 MySQLConnection::Open |
( |
| ) |
|
◆ operator=()
◆ Ping()
void MySQLConnection::Ping |
( |
| ) |
|
◆ PrepareStatement()
◆ PrepareStatements()
bool MySQLConnection::PrepareStatements |
( |
| ) |
|
◆ Query() [1/2]
ResultSet * MySQLConnection::Query |
( |
char const * |
sql | ) |
|
◆ Query() [2/2]
◆ RollbackTransaction()
void MySQLConnection::RollbackTransaction |
( |
| ) |
|
◆ StartWorkerThread()
◆ Unlock()
void MySQLConnection::Unlock |
( |
| ) |
|
|
protected |
Called by parent databasepool. Will let other threads access this connection.
Definition at line 474 of file MySQLConnection.cpp.
◆ DatabaseWorkerPool
◆ PingOperation
friend class PingOperation |
|
friend |
◆ m_connectionFlags
Connection flags (for preparing relevant statements)
Definition at line 111 of file MySQLConnection.h.
◆ m_connectionInfo
◆ m_Mutex
std::mutex MySQLConnection::m_Mutex |
|
private |
◆ m_Mysql
◆ m_prepareError
bool MySQLConnection::m_prepareError |
|
protected |
◆ m_reconnecting
bool MySQLConnection::m_reconnecting |
|
protected |
◆ m_stmts
◆ m_workerThread
std::unique_ptr<WorkerThread> MySQLConnection::m_workerThread |
|
private |
The documentation for this class was generated from the following files: