aboutsummaryrefslogtreecommitdiff
path: root/src/server/database/Database/PreparedStatement.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2017-05-12 18:49:51 +0200
committerShauren <shauren.trinity@gmail.com>2017-05-12 18:50:27 +0200
commit7e538980a2b4fc6c74bde7bd456633d954272708 (patch)
tree73454d83035b0ddd099e4bc934222df60b66f597 /src/server/database/Database/PreparedStatement.h
parent8fdf0778ca340d0bbf0e70dbf091d20c838981d3 (diff)
Core/Database: Include cleanup
Diffstat (limited to 'src/server/database/Database/PreparedStatement.h')
-rw-r--r--src/server/database/Database/PreparedStatement.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/server/database/Database/PreparedStatement.h b/src/server/database/Database/PreparedStatement.h
index ddc731625fa..7e39581e4d3 100644
--- a/src/server/database/Database/PreparedStatement.h
+++ b/src/server/database/Database/PreparedStatement.h
@@ -18,8 +18,10 @@
#ifndef _PREPAREDSTATEMENT_H
#define _PREPAREDSTATEMENT_H
-#include <future>
+#include "Define.h"
#include "SQLOperation.h"
+#include <future>
+#include <vector>
#ifdef __APPLE__
#undef TYPE_BOOL
@@ -120,6 +122,7 @@ class TC_DATABASE_API MySQLPreparedStatement
MySQLPreparedStatement(MYSQL_STMT* stmt);
~MySQLPreparedStatement();
+ void setNull(const uint8 index);
void setBool(const uint8 index, const bool value);
void setUInt8(const uint8 index, const uint8 value);
void setUInt16(const uint8 index, const uint16 value);
@@ -132,20 +135,16 @@ class TC_DATABASE_API MySQLPreparedStatement
void setFloat(const uint8 index, const float value);
void setDouble(const uint8 index, const double value);
void setBinary(const uint8 index, const std::vector<uint8>& value, bool isString);
- void setNull(const uint8 index);
protected:
MYSQL_STMT* GetSTMT() { return m_Mstmt; }
MYSQL_BIND* GetBind() { return m_bind; }
PreparedStatement* m_stmt;
void ClearParameters();
- bool CheckValidIndex(uint8 index);
+ void CheckValidIndex(uint8 index);
std::string getQueryString(std::string const& sqlPattern) const;
private:
- void setValue(MYSQL_BIND* param, enum_field_types type, const void* value, uint32 len, bool isUnsigned);
-
- private:
MYSQL_STMT* m_Mstmt;
uint32 m_paramCount;
std::vector<bool> m_paramsSet;
@@ -155,9 +154,6 @@ class TC_DATABASE_API MySQLPreparedStatement
MySQLPreparedStatement& operator=(MySQLPreparedStatement const& right) = delete;
};
-typedef std::future<PreparedQueryResult> PreparedQueryResultFuture;
-typedef std::promise<PreparedQueryResult> PreparedQueryResultPromise;
-
//- Lower-level class, enqueuable operation
class TC_DATABASE_API PreparedStatementTask : public SQLOperation
{