Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::db::impl::MariaStmtResultSet Class Referencefinal

Maria prepared result set implementation. More...

#include <MariaStmtResultSetImpl.h>

Inheritance diagram for sese::db::impl::MariaStmtResultSet:
sese::db::ResultSet

Public Member Functions

 MariaStmtResultSet (MYSQL_STMT *stmt, MYSQL_BIND *row, size_t count) noexcept
 
 ~MariaStmtResultSet () noexcept override
 
void reset () noexcept override
 Locate the first query record.
 
bool next () noexcept override
 Move to the next record.
 
bool isNull (size_t index) const noexcept override
 Determine if the returned result is null.
 
size_t getColumns () const noexcept override
 Get the number of columns in the record.
 
int32_t getInteger (size_t index) const noexcept override
 Get an integer value from the current record.
 
int64_t getLong (size_t index) const noexcept override
 Get a long integer value from the current record.
 
std::string_view getString (size_t index) const noexcept override
 Get a string from the current record.
 
double getDouble (size_t index) const noexcept override
 Get a double-precision floating-point value from the current record.
 
float getFloat (size_t index) const noexcept override
 Get a single-precision floating-point value from the current record.
 
std::optional< sese::DateTimegetDateTime (size_t index) const noexcept override
 Get a time data structure from the current record.
 
- Public Member Functions inherited from sese::db::ResultSet
virtual ~ResultSet () noexcept=default
 

Protected Attributes

MYSQL_STMT * stmt
 
MYSQL_BIND * row
 
size_t columns
 

Additional Inherited Members

- Public Types inherited from sese::db::ResultSet
using Ptr = std::unique_ptr<ResultSet>
 

Detailed Description

Maria prepared result set implementation.

Constructor & Destructor Documentation

◆ MariaStmtResultSet()

sese::db::impl::MariaStmtResultSet::MariaStmtResultSet ( MYSQL_STMT * stmt,
MYSQL_BIND * row,
size_t count )
explicitnoexcept

References count().

◆ ~MariaStmtResultSet()

sese::db::impl::MariaStmtResultSet::~MariaStmtResultSet ( )
overridenoexcept

Member Function Documentation

◆ getColumns()

size_t sese::db::impl::MariaStmtResultSet::getColumns ( ) const
nodiscardoverridevirtualnoexcept

Get the number of columns in the record.

Returns
Number of columns in the result set record

Implements sese::db::ResultSet.

◆ getDateTime()

std::optional< sese::DateTime > sese::db::impl::MariaStmtResultSet::getDateTime ( size_t index) const
nodiscardoverridevirtualnoexcept

Get a time data structure from the current record.

Parameters
indexIndex
Returns
Time data structure

Implements sese::db::ResultSet.

References sese::DateTime::FORMAT, and timegm.

◆ getDouble()

double sese::db::impl::MariaStmtResultSet::getDouble ( size_t index) const
nodiscardoverridevirtualnoexcept

Get a double-precision floating-point value from the current record.

Parameters
indexIndex
Returns
Double-precision floating-point value

Implements sese::db::ResultSet.

◆ getFloat()

float sese::db::impl::MariaStmtResultSet::getFloat ( size_t index) const
nodiscardoverridevirtualnoexcept

Get a single-precision floating-point value from the current record.

Parameters
indexIndex
Returns
Single-precision floating-point value

Implements sese::db::ResultSet.

◆ getInteger()

int32_t sese::db::impl::MariaStmtResultSet::getInteger ( size_t index) const
nodiscardoverridevirtualnoexcept

Get an integer value from the current record.

Parameters
indexIndex
Returns
Integer value

Implements sese::db::ResultSet.

◆ getLong()

int64_t sese::db::impl::MariaStmtResultSet::getLong ( size_t index) const
nodiscardoverridevirtualnoexcept

Get a long integer value from the current record.

Parameters
indexIndex
Returns
Long integer value

Implements sese::db::ResultSet.

◆ getString()

std::string_view sese::db::impl::MariaStmtResultSet::getString ( size_t index) const
nodiscardoverridevirtualnoexcept

Get a string from the current record.

Parameters
indexIndex
Returns
String

Implements sese::db::ResultSet.

◆ isNull()

bool sese::db::impl::MariaStmtResultSet::isNull ( size_t index) const
nodiscardoverridevirtualnoexcept

Determine if the returned result is null.

Parameters
indexIndex
Returns
Whether it is null

Implements sese::db::ResultSet.

◆ next()

bool sese::db::impl::MariaStmtResultSet::next ( )
nodiscardoverridevirtualnoexcept

Move to the next record.

Returns
Whether there is a next record

Implements sese::db::ResultSet.

◆ reset()

void sese::db::impl::MariaStmtResultSet::reset ( )
overridevirtualnoexcept

Locate the first query record.

Implements sese::db::ResultSet.

Member Data Documentation

◆ columns

size_t sese::db::impl::MariaStmtResultSet::columns
protected

Referenced by ~MariaStmtResultSet().

◆ row

MYSQL_BIND* sese::db::impl::MariaStmtResultSet::row
protected

Referenced by ~MariaStmtResultSet().

◆ stmt

MYSQL_STMT* sese::db::impl::MariaStmtResultSet::stmt
protected

The documentation for this class was generated from the following files: