mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-10 20:19:49 +01:00
Server/Database: Reduce differences between 3.3.5 and 6.x branches
Cherry-pick1bea52fd46and543bea32to add support to TYPE_BINARY MySQL field type
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user