|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <PreparedStatement.h>
Public Member Functions | |
| MySQLPreparedStatement (MYSQL_STMT *stmt) | |
| void | setBinary (const uint8 index, const std::vector< uint8 > &value, bool isString) |
| void | setBool (const uint8 index, const bool value) |
| void | setDouble (const uint8 index, const double value) |
| void | setFloat (const uint8 index, const float value) |
| void | setInt16 (const uint8 index, const int16 value) |
| void | setInt32 (const uint8 index, const int32 value) |
| void | setInt64 (const uint8 index, const int64 value) |
| void | setInt8 (const uint8 index, const int8 value) |
| void | setNull (const uint8 index) |
| void | setUInt16 (const uint8 index, const uint16 value) |
| void | setUInt32 (const uint8 index, const uint32 value) |
| void | setUInt64 (const uint8 index, const uint64 value) |
| void | setUInt8 (const uint8 index, const uint8 value) |
| ~MySQLPreparedStatement () | |
Protected Member Functions | |
| bool | CheckValidIndex (uint8 index) |
| void | ClearParameters () |
| MYSQL_BIND * | GetBind () |
| std::string | getQueryString (std::string const &sqlPattern) const |
| MYSQL_STMT * | GetSTMT () |
Protected Attributes | |
| PreparedStatement * | m_stmt |
Private Member Functions | |
| MySQLPreparedStatement (MySQLPreparedStatement const &right)=delete | |
| MySQLPreparedStatement & | operator= (MySQLPreparedStatement const &right)=delete |
| void | setValue (MYSQL_BIND *param, enum_field_types type, const void *value, uint32 len, bool isUnsigned) |
Private Attributes | |
| MYSQL_BIND * | m_bind |
| MYSQL_STMT * | m_Mstmt |
| uint32 | m_paramCount |
| std::vector< bool > | m_paramsSet |
Friends | |
| class | MySQLConnection |
| class | PreparedStatement |
Definition at line 107 of file PreparedStatement.h.
| MySQLPreparedStatement::MySQLPreparedStatement | ( | MYSQL_STMT * | stmt | ) |
Initialize variable parameters
"If set to 1, causes mysql_stmt_store_result() to update the metadata MYSQL_FIELD->max_length value."
Definition at line 202 of file PreparedStatement.cpp.
References m_bind, m_Mstmt, m_paramCount, m_paramsSet, and m_stmt.
Referenced by MySQLPreparedStatement(), and operator=().
| MySQLPreparedStatement::~MySQLPreparedStatement | ( | ) |
Definition at line 218 of file PreparedStatement.cpp.
References ClearParameters(), m_bind, and m_Mstmt.
|
privatedelete |
References MySQLPreparedStatement().
|
protected |
Definition at line 249 of file PreparedStatement.cpp.
References ASSERT, m_paramCount, m_paramsSet, m_stmt, ParamenterIndexAssertFail(), and SF_LOG_WARN.
Referenced by setBinary(), setDouble(), setFloat(), setInt16(), setInt32(), setInt64(), setInt8(), setNull(), setUInt16(), setUInt32(), setUInt64(), and setUInt8().
|
protected |
Definition at line 230 of file PreparedStatement.cpp.
References m_bind, m_paramCount, and m_paramsSet.
Referenced by ~MySQLPreparedStatement().
|
inlineprotected |
Definition at line 132 of file PreparedStatement.h.
References m_bind.
|
protected |
Definition at line 392 of file PreparedStatement.cpp.
References m_stmt, TYPE_BINARY, TYPE_BOOL, TYPE_DOUBLE, TYPE_FLOAT, TYPE_I16, TYPE_I32, TYPE_I64, TYPE_I8, TYPE_NULL, TYPE_STRING, TYPE_UI16, TYPE_UI32, TYPE_UI64, and TYPE_UI8.
|
inlineprotected |
Definition at line 131 of file PreparedStatement.h.
References m_Mstmt.
|
privatedelete |
References MySQLPreparedStatement().
| void MySQLPreparedStatement::setBinary | ( | const uint8 | index, |
| const std::vector< uint8 > & | value, | ||
| bool | isString ) |
Definition at line 343 of file PreparedStatement.cpp.
References CheckValidIndex(), m_bind, and m_paramsSet.
| void MySQLPreparedStatement::setBool | ( | const uint8 | index, |
| const bool | value ) |
Definition at line 258 of file PreparedStatement.cpp.
References setUInt8().
| void MySQLPreparedStatement::setDouble | ( | const uint8 | index, |
| const double | value ) |
Definition at line 335 of file PreparedStatement.cpp.
References CheckValidIndex(), m_bind, m_paramsSet, and setValue().
| void MySQLPreparedStatement::setFloat | ( | const uint8 | index, |
| const float | value ) |
Definition at line 327 of file PreparedStatement.cpp.
References CheckValidIndex(), m_bind, m_paramsSet, and setValue().
Definition at line 303 of file PreparedStatement.cpp.
References CheckValidIndex(), m_bind, m_paramsSet, and setValue().
Definition at line 311 of file PreparedStatement.cpp.
References CheckValidIndex(), m_bind, m_paramsSet, and setValue().
Definition at line 319 of file PreparedStatement.cpp.
References CheckValidIndex(), m_bind, m_paramsSet, and setValue().
Definition at line 295 of file PreparedStatement.cpp.
References CheckValidIndex(), m_bind, m_paramsSet, and setValue().
| void MySQLPreparedStatement::setNull | ( | const uint8 | index | ) |
Definition at line 365 of file PreparedStatement.cpp.
References CheckValidIndex(), m_bind, and m_paramsSet.
Definition at line 271 of file PreparedStatement.cpp.
References CheckValidIndex(), m_bind, m_paramsSet, and setValue().
Definition at line 279 of file PreparedStatement.cpp.
References CheckValidIndex(), m_bind, m_paramsSet, and setValue().
Definition at line 287 of file PreparedStatement.cpp.
References CheckValidIndex(), m_bind, m_paramsSet, and setValue().
Definition at line 263 of file PreparedStatement.cpp.
References CheckValidIndex(), m_bind, m_paramsSet, and setValue().
Referenced by setBool().
|
private |
Definition at line 379 of file PreparedStatement.cpp.
Referenced by setDouble(), setFloat(), setInt16(), setInt32(), setInt64(), setInt8(), setUInt16(), setUInt32(), setUInt64(), and setUInt8().
|
friend |
Definition at line 109 of file PreparedStatement.h.
References MySQLConnection.
Referenced by MySQLConnection.
|
friend |
Definition at line 110 of file PreparedStatement.h.
References PreparedStatement.
Referenced by PreparedStatement.
|
private |
Definition at line 145 of file PreparedStatement.h.
Referenced by ClearParameters(), GetBind(), MySQLPreparedStatement(), setBinary(), setDouble(), setFloat(), setInt16(), setInt32(), setInt64(), setInt8(), setNull(), setUInt16(), setUInt32(), setUInt64(), setUInt8(), and ~MySQLPreparedStatement().
|
private |
Definition at line 142 of file PreparedStatement.h.
Referenced by GetSTMT(), MySQLPreparedStatement(), and ~MySQLPreparedStatement().
|
private |
Definition at line 143 of file PreparedStatement.h.
Referenced by CheckValidIndex(), ClearParameters(), and MySQLPreparedStatement().
|
private |
Definition at line 144 of file PreparedStatement.h.
Referenced by CheckValidIndex(), ClearParameters(), MySQLPreparedStatement(), setBinary(), setDouble(), setFloat(), setInt16(), setInt32(), setInt64(), setInt8(), setNull(), setUInt16(), setUInt32(), setUInt64(), and setUInt8().
|
protected |
Definition at line 133 of file PreparedStatement.h.
Referenced by CheckValidIndex(), getQueryString(), and MySQLPreparedStatement().