diff options
author | jackpoz <giacomopoz@gmail.com> | 2016-08-10 16:02:22 +0200 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2016-08-10 16:02:22 +0200 |
commit | abe37e458c2b482d478ce98ba44bc8dcf76caeb1 (patch) | |
tree | 9cbbbbaa3ab019e549b3e310e6f3ebf9aae8d62b /src/server/database/Database/PreparedStatement.h | |
parent | 375593761167ba1bf8ef16bbe345cb569ad1e00b (diff) |
Server/Database: Reduce differences between 3.3.5 and 6.x branches
Cherry-pick 1bea52fd4649b6a1761aa157f9e74f01e19872e7 and 543bea32 to add support to TYPE_BINARY MySQL field type
Diffstat (limited to 'src/server/database/Database/PreparedStatement.h')
-rw-r--r-- | src/server/database/Database/PreparedStatement.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/database/Database/PreparedStatement.h b/src/server/database/Database/PreparedStatement.h index faaec27014f..d7508dbae1f 100644 --- a/src/server/database/Database/PreparedStatement.h +++ b/src/server/database/Database/PreparedStatement.h @@ -56,6 +56,7 @@ enum PreparedStatementValueType TYPE_FLOAT, TYPE_DOUBLE, TYPE_STRING, + TYPE_BINARY, TYPE_NULL }; @@ -63,7 +64,7 @@ struct PreparedStatementData { PreparedStatementDataUnion data; PreparedStatementValueType type; - std::string str; + std::vector<uint8> binary; }; //- Forward declare @@ -92,6 +93,7 @@ class TC_DATABASE_API PreparedStatement void setFloat(const uint8 index, const float value); void setDouble(const uint8 index, const double value); void setString(const uint8 index, const std::string& value); + void setBinary(const uint8 index, const std::vector<uint8>& value); void setNull(const uint8 index); protected: @@ -129,7 +131,7 @@ class TC_DATABASE_API MySQLPreparedStatement void setInt64(const uint8 index, const int64 value); void setFloat(const uint8 index, const float value); void setDouble(const uint8 index, const double value); - void setString(const uint8 index, const char* value); + void setBinary(const uint8 index, const std::vector<uint8>& value, bool isString); void setNull(const uint8 index); protected: |