SQLite prepared statement implementation.
More...
#include <SqlitePreparedStatementImpl.h>
|
| SqlitePreparedStatementImpl (sqlite3_stmt *stmt, size_t count) noexcept |
|
| ~SqlitePreparedStatementImpl () 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 | setLong (uint32_t index, const int64_t &value) noexcept override |
| Set long integer value.
|
|
bool | setInteger (uint32_t index, const int32_t &value) noexcept override |
| Set 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.
|
|
virtual | ~PreparedStatement () noexcept=default |
|
ErrorCode | getErrorCode () const |
|
|
static std::string | splitBefore (const std::string &str) |
|
SQLite prepared statement implementation.
◆ SqlitePreparedStatementImpl()
impl::SqlitePreparedStatementImpl::SqlitePreparedStatementImpl |
( |
sqlite3_stmt * | stmt, |
|
|
size_t | count ) |
|
explicitnoexcept |
◆ ~SqlitePreparedStatementImpl()
impl::SqlitePreparedStatementImpl::~SqlitePreparedStatementImpl |
( |
| ) |
|
|
overridenoexcept |
◆ executeQuery()
◆ executeUpdate()
int64_t impl::SqlitePreparedStatementImpl::executeUpdate |
( |
| ) |
|
|
overridevirtualnoexcept |
◆ getColumnSize()
int64_t impl::SqlitePreparedStatementImpl::getColumnSize |
( |
uint32_t | index | ) |
|
|
overridevirtualnoexcept |
Get result set column size. This interface is usually only effective when the type is binary or string, and the unit is bytes.
- Parameters
-
- Returns
- Returns -1 if failed
Implements sese::db::PreparedStatement.
◆ getColumnType()
bool impl::SqlitePreparedStatementImpl::getColumnType |
( |
uint32_t | index, |
|
|
MetadataType & | type ) |
|
overridevirtualnoexcept |
◆ getLastError()
int impl::SqlitePreparedStatementImpl::getLastError |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
◆ getLastErrorMessage()
const char * impl::SqlitePreparedStatementImpl::getLastErrorMessage |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
Get the error message for the corresponding driver of the instance. Need to check for null.
- Return values
-
nullptr | Failed to get error message |
- Returns
- Error message
Implements sese::db::PreparedStatement.
◆ setDateTime()
bool impl::SqlitePreparedStatementImpl::setDateTime |
( |
uint32_t | index, |
|
|
const sese::DateTime & | value ) |
|
overridevirtualnoexcept |
◆ setDouble()
bool impl::SqlitePreparedStatementImpl::setDouble |
( |
uint32_t | index, |
|
|
const double & | value ) |
|
overridevirtualnoexcept |
◆ setFloat()
bool impl::SqlitePreparedStatementImpl::setFloat |
( |
uint32_t | index, |
|
|
const float & | value ) |
|
overridevirtualnoexcept |
◆ setInteger()
bool impl::SqlitePreparedStatementImpl::setInteger |
( |
uint32_t | index, |
|
|
const int32_t & | value ) |
|
overridevirtualnoexcept |
◆ setLong()
bool impl::SqlitePreparedStatementImpl::setLong |
( |
uint32_t | index, |
|
|
const int64_t & | value ) |
|
overridevirtualnoexcept |
◆ setNull()
bool impl::SqlitePreparedStatementImpl::setNull |
( |
uint32_t | index | ) |
|
|
overridevirtualnoexcept |
◆ setText()
bool impl::SqlitePreparedStatementImpl::setText |
( |
uint32_t | index, |
|
|
const char * | value ) |
|
overridevirtualnoexcept |
◆ splitBefore()
std::string impl::SqlitePreparedStatementImpl::splitBefore |
( |
const std::string & | str | ) |
|
|
staticprotected |
◆ buffer
void** sese::db::impl::SqlitePreparedStatementImpl::buffer |
|
protected |
◆ count
size_t sese::db::impl::SqlitePreparedStatementImpl::count = 0 |
|
protected |
◆ INTEGER_AFFINITY_SET
const char * impl::SqlitePreparedStatementImpl::INTEGER_AFFINITY_SET |
|
staticprotected |
Initial value:{
"INT",
"INTEGER",
"TINYINT",
"SMALLINT",
"MEDIUMINT",
"BIGINT",
"UNSIGNED BIG INT",
"INT2",
"INT8"
}
◆ isManual
bool* sese::db::impl::SqlitePreparedStatementImpl::isManual |
|
protected |
◆ REAL_AFFINITY_SET
const char * impl::SqlitePreparedStatementImpl::REAL_AFFINITY_SET |
|
staticprotected |
Initial value:{
"REAL",
"DOUBLE",
"DOUBLE PRECISION",
"FLOAT",
"NUMERIC",
"DECIMAL"
}
◆ stmt
sqlite3_stmt* sese::db::impl::SqlitePreparedStatementImpl::stmt |
|
protected |
◆ stmtStatus
bool sese::db::impl::SqlitePreparedStatementImpl::stmtStatus = false |
|
protected |
◆ TEXT_AFFINITY_SET
const char * impl::SqlitePreparedStatementImpl::TEXT_AFFINITY_SET |
|
staticprotected |
Initial value:{
"CHARACTER",
"VARCHAR",
"VARYING CHARACTER",
"NCHAR",
"NATIVE CHARACTER",
"NVARCHAR",
"TEXT",
"CLOB"
}
The documentation for this class was generated from the following files: