aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Database/PreparedStatement.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/shared/Database/PreparedStatement.h')
-rw-r--r--src/server/shared/Database/PreparedStatement.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/shared/Database/PreparedStatement.h b/src/server/shared/Database/PreparedStatement.h
index 90ea435d1f9..9334bc6dc66 100644
--- a/src/server/shared/Database/PreparedStatement.h
+++ b/src/server/shared/Database/PreparedStatement.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -55,7 +55,8 @@ enum PreparedStatementValueType
TYPE_I64,
TYPE_FLOAT,
TYPE_DOUBLE,
- TYPE_STRING
+ TYPE_STRING,
+ TYPE_NULL
};
struct PreparedStatementData
@@ -91,6 +92,7 @@ class 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 setNull(const uint8 index);
protected:
void BindParameters();
@@ -125,6 +127,7 @@ class MySQLPreparedStatement
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 setNull(const uint8 index);
protected:
MYSQL_STMT* GetSTMT() { return m_Mstmt; }
@@ -132,7 +135,7 @@ class MySQLPreparedStatement
PreparedStatement* m_stmt;
void ClearParameters();
bool CheckValidIndex(uint8 index);
- std::string getQueryString(const char *query);
+ 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);