18 #ifndef _PREPAREDSTATEMENT_H
19 #define _PREPAREDSTATEMENT_H
78 friend class MySQLConnection;
84 void setBool(
const uint8 index,
const bool value);
93 void setFloat(
const uint8 index,
const float value);
94 void setDouble(
const uint8 index,
const double value);
95 void setString(
const uint8 index,
const std::string&
value);
96 void setBinary(
const uint8 index,
const std::vector<uint8>&
value);
97 void setNull(
const uint8 index);
100 void BindParameters();
116 friend class MySQLConnection;
141 void ClearParameters();
142 bool CheckValidIndex(
uint8 index);
143 std::string getQueryString(std::string
const& sqlPattern)
const;
146 void setValue(MYSQL_BIND* param, enum_field_types type,
const void*
value,
uint32 len,
bool isUnsigned);
#define TC_DATABASE_API
Definition: Define.h:122
PreparedQueryResultFuture GetFuture()
Definition: PreparedStatement.h:169
Definition: PreparedStatement.h:55
PreparedStatement * m_stmt
Definition: PreparedStatement.h:172
PreparedStatementValueType
Definition: PreparedStatement.h:45
std::vector< bool > m_paramsSet
Definition: PreparedStatement.h:151
PreparedStatementDataUnion data
Definition: PreparedStatement.h:65
int8_t int8
Definition: Define.h:148
Definition: PreparedStatement.h:51
uint16 ui16
Definition: PreparedStatement.h:34
std::future< PreparedQueryResult > PreparedQueryResultFuture
Definition: PreparedStatement.h:158
PreparedStatementValueType type
Definition: PreparedStatement.h:66
MYSQL_STMT * GetSTMT()
Definition: PreparedStatement.h:138
int64_t int64
Definition: Define.h:145
void setBinary(const uint8 index, const std::vector< uint8 > &value)
Definition: PreparedStatement.cpp:197
int16 i16
Definition: PreparedStatement.h:35
void setInt16(const uint8 index, const int16 value)
Definition: PreparedStatement.cpp:142
void setUInt8(const uint8 index, const uint8 value)
Definition: PreparedStatement.cpp:97
Definition: PreparedStatement.h:54
Definition: PreparedStatement.h:47
MYSQL_BIND * m_bind
Definition: PreparedStatement.h:152
Definition: PreparedStatement.h:63
PreparedStatement * m_stmt
Definition: PreparedStatement.h:140
Definition: PreparedStatement.h:56
Definition: PreparedStatement.h:58
Definition: PreparedStatement.h:60
Definition: PreparedStatement.h:74
void setBool(const uint8 index, const bool value)
Definition: PreparedStatement.cpp:88
Definition: PreparedStatement.h:52
uint8 ui8
Definition: PreparedStatement.h:32
uint64 ui64
Definition: PreparedStatement.h:38
int8 i8
Definition: PreparedStatement.h:33
std::promise< PreparedQueryResult > PreparedQueryResultPromise
Definition: Callback.h:27
bool m_has_result
Definition: PreparedStatement.h:173
void setUInt16(const uint8 index, const uint16 value)
Definition: PreparedStatement.cpp:106
std::vector< PreparedStatementData > statement_data
Definition: PreparedStatement.h:105
Vector2int16 & operator=(const Any &a)
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
uint64_t uint64
Definition: Define.h:149
Definition: PreparedStatement.h:114
uint16_t uint16
Definition: Define.h:151
void setInt64(const uint8 index, const int64 value)
Definition: PreparedStatement.cpp:160
Definition: PreparedStatement.h:49
PreparedQueryResultPromise * m_result
Definition: PreparedStatement.h:174
Definition: PreparedStatement.h:53
void setInt32(const uint8 index, const int32 value)
Definition: PreparedStatement.cpp:151
void setUInt32(const uint8 index, const uint32 value)
Definition: PreparedStatement.cpp:115
bool boolean
Definition: PreparedStatement.h:31
uint32 ui32
Definition: PreparedStatement.h:36
float f
Definition: PreparedStatement.h:40
uint32 m_paramCount
Definition: PreparedStatement.h:150
void setInt8(const uint8 index, const int8 value)
Definition: PreparedStatement.cpp:133
std::future< PreparedQueryResult > PreparedQueryResultFuture
Definition: Callback.h:26
double d
Definition: PreparedStatement.h:41
std::vector< uint8 > binary
Definition: PreparedStatement.h:67
Definition: PreparedStatement.h:48
Definition: PreparedStatement.h:162
void setNull(const uint8 index)
Definition: PreparedStatement.cpp:206
uint32 m_index
Definition: PreparedStatement.h:104
Definition: PreparedStatement.h:50
void setFloat(const uint8 index, const float value)
Definition: PreparedStatement.cpp:169
void setDouble(const uint8 index, const double value)
Definition: PreparedStatement.cpp:178
void setUInt64(const uint8 index, const uint64 value)
Definition: PreparedStatement.cpp:124
uint8_t uint8
Definition: Define.h:152
MYSQL_STMT * m_Mstmt
Definition: PreparedStatement.h:149
Definition: SQLOperation.h:56
std::promise< PreparedQueryResult > PreparedQueryResultPromise
Definition: PreparedStatement.h:159
Definition: PreparedStatement.h:29
const FieldDescriptor value
Definition: descriptor.h:1522
int16_t int16
Definition: Define.h:147
MYSQL_BIND * GetBind()
Definition: PreparedStatement.h:139
Definition: PreparedStatement.h:57
Definition: PreparedStatement.h:59
MySQLPreparedStatement * m_stmt
Definition: PreparedStatement.h:103
int64 i64
Definition: PreparedStatement.h:39
int32 i32
Definition: PreparedStatement.h:37
friend class MySQLPreparedStatement
Definition: PreparedStatement.h:77