diff options
Diffstat (limited to 'src/server/shared/Database/MySQLConnection.h')
-rw-r--r-- | src/server/shared/Database/MySQLConnection.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h index 5e68e9d7516..c0f792b1191 100644 --- a/src/server/shared/Database/MySQLConnection.h +++ b/src/server/shared/Database/MySQLConnection.h @@ -20,6 +20,8 @@ #define _MYSQLCONNECTION_H class DatabaseWorker; +class PreparedStatement; +class MySQLPreparedStatement; class MySQLConnection { @@ -34,6 +36,7 @@ class MySQLConnection public: bool Execute(const char* sql); + bool Execute(PreparedStatement* stmt); QueryResult_AutoPtr Query(const char* sql); bool _Query(const char *sql, MYSQL_RES **pResult, MYSQL_FIELD **pFields, uint64* pRowCount, uint32* pFieldCount); @@ -45,12 +48,15 @@ class MySQLConnection protected: MYSQL* GetHandle() { return m_Mysql; } + MySQLPreparedStatement* GetPreparedStatement(uint32 index); + void PrepareStatement(uint32 index, const char* sql); private: ACE_Activation_Queue* m_queue; //! Queue shared with other asynchroneous connections. DatabaseWorker* m_worker; //! Core worker task. MYSQL * m_Mysql; //! MySQL Handle. ACE_Thread_Mutex m_Mutex; + std::vector<MySQLPreparedStatement*> m_stmts; //! PreparedStatements storage }; #endif
\ No newline at end of file |