Sese Framework
2.3.0
A cross-platform framework
|
Maria prepared statement implementation. More...
#include <MariaPreparedStatementImpl.h>
Public Member Functions | |
MariaPreparedStatementImpl (MYSQL_STMT *stmt, MYSQL_RES *meta, size_t count) noexcept | |
~MariaPreparedStatementImpl () noexcept override | |
ResultSet::Ptr | executeQuery () noexcept override |
Execute query. | |
int64_t | executeUpdate () noexcept override |
Execute update. | |
bool | setDouble (uint32_t index, const double &value) noexcept override |
Set double-precision floating-point value. | |
bool | setFloat (uint32_t index, const float &value) noexcept override |
Set single-precision floating-point value. | |
bool | setInteger (uint32_t index, const int32_t &value) noexcept override |
Set integer value. | |
bool | setLong (uint32_t index, const int64_t &value) noexcept override |
Set long integer value. | |
bool | setText (uint32_t index, const char *value) noexcept override |
Set text value. | |
bool | setNull (uint32_t index) noexcept override |
Set to NULL. | |
bool | setDateTime (uint32_t index, const sese::DateTime &value) noexcept override |
Set to dateTime. | |
bool | getColumnType (uint32_t index, MetadataType &type) noexcept override |
Get result set column type. | |
int64_t | getColumnSize (uint32_t index) noexcept override |
Get result set column size. This interface is usually only effective when the type is binary or string, and the unit is bytes. | |
int | getLastError () const noexcept override |
Get the error code for the corresponding driver of the instance. | |
const char * | getLastErrorMessage () const noexcept override |
Get the error message for the corresponding driver of the instance. Need to check for null. | |
Public Member Functions inherited from sese::db::PreparedStatement | |
virtual | ~PreparedStatement () noexcept=default |
ErrorCode | getErrorCode () const |
Static Public Member Functions | |
static bool | mallocBindStruct (MYSQL_RES *meta, MYSQL_BIND **bind) noexcept |
static void | freeBindStruct (MYSQL_BIND *bind, size_t count) noexcept |
static void | reinterpret (MYSQL_BIND *target, enum_field_types expece_type, const void *buffer, size_t size) noexcept |
Protected Attributes | |
MYSQL_STMT * | stmt |
size_t | count = 0 |
MYSQL_BIND * | param |
MYSQL_RES * | meta |
Additional Inherited Members | |
Public Types inherited from sese::db::PreparedStatement | |
using | Ptr = std::unique_ptr<PreparedStatement> |
Maria prepared statement implementation.
|
explicitnoexcept |
References count().
|
overridenoexcept |
|
overridevirtualnoexcept |
Execute query.
nullptr | Query failed |
Implements sese::db::PreparedStatement.
|
overridevirtualnoexcept |
Execute update.
-1 | Update failed |
Implements sese::db::PreparedStatement.
|
staticnoexcept |
References count(), and free().
Referenced by sese::db::impl::MariaStmtResultSet::~MariaStmtResultSet().
|
overridevirtualnoexcept |
Get result set column size. This interface is usually only effective when the type is binary or string, and the unit is bytes.
index | Index value |
Implements sese::db::PreparedStatement.
|
overridevirtualnoexcept |
Get result set column type.
index | Index value |
type | Column type |
Implements sese::db::PreparedStatement.
References sese::db::CHAR, sese::db::DATE, sese::db::DATE_TIME, sese::db::DOUBLE, sese::db::FLOAT, sese::db::INTEGER, sese::db::LONG, sese::db::SHORT, sese::db::TEXT, sese::db::TIME, and sese::db::UNKNOWN.
|
nodiscardoverridevirtualnoexcept |
Get the error code for the corresponding driver of the instance.
Implements sese::db::PreparedStatement.
|
nodiscardoverridevirtualnoexcept |
Get the error message for the corresponding driver of the instance. Need to check for null.
nullptr | Failed to get error message |
Implements sese::db::PreparedStatement.
|
staticnoexcept |
|
staticnoexcept |
References free().
|
overridevirtualnoexcept |
Set to dateTime.
index | Index |
value | Date |
Implements sese::db::PreparedStatement.
|
overridevirtualnoexcept |
Set double-precision floating-point value.
index | Index |
value | Value |
Implements sese::db::PreparedStatement.
References count().
|
overridevirtualnoexcept |
Set single-precision floating-point value.
index | Index |
value | Value |
Implements sese::db::PreparedStatement.
References count().
|
overridevirtualnoexcept |
Set integer value.
index | Index |
value | Value |
Implements sese::db::PreparedStatement.
References count().
|
overridevirtualnoexcept |
Set long integer value.
index | Index |
value | Value |
Implements sese::db::PreparedStatement.
References count().
|
overridevirtualnoexcept |
Set to NULL.
index | Index |
Implements sese::db::PreparedStatement.
|
overridevirtualnoexcept |
Set text value.
index | Index |
value | Value |
Implements sese::db::PreparedStatement.
|
protected |
Referenced by ~MariaPreparedStatementImpl().
|
protected |
Referenced by ~MariaPreparedStatementImpl().
|
protected |
Referenced by ~MariaPreparedStatementImpl().
|
protected |
Referenced by ~MariaPreparedStatementImpl().