StormByte C++ Library: Database module 0.0.9999
StormByte-Database is a StormByte library module for handling database connections
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
StormByte::Database::SQLite::PreparedSTMT Class Referencefinal

Prepared statement for SQLite. More...

#include <preparedSTMT.hxx>

Inheritance diagram for StormByte::Database::SQLite::PreparedSTMT:
Inheritance graph
[legend]
Collaboration diagram for StormByte::Database::SQLite::PreparedSTMT:
Collaboration graph
[legend]

Public Member Functions

 PreparedSTMT (const PreparedSTMT &)=delete
 
 PreparedSTMT (PreparedSTMT &&) noexcept=default
 
PreparedSTMToperator= (const PreparedSTMT &)=delete
 
PreparedSTMToperator= (PreparedSTMT &&) noexcept=default
 
 ~PreparedSTMT () noexcept override
 
PreparedSTMTBind (const int &index, const std::nullptr_t &value) noexcept override
 
PreparedSTMTBind (const int &index, const int &value) noexcept override
 
PreparedSTMTBind (const int &index, const unsigned int &value) noexcept override
 
PreparedSTMTBind (const int &index, const int64_t &value) noexcept override
 
PreparedSTMTBind (const int &index, const uint64_t &value) noexcept override
 
PreparedSTMTBind (const int &index, const double &value) noexcept override
 
PreparedSTMTBind (const int &index, bool value) noexcept override
 
PreparedSTMTBind (const int &index, const std::string &value) noexcept override
 
void Reset () noexcept override
 
const RowStep () noexcept override
 
- Public Member Functions inherited from StormByte::Database::PreparedSTMT< Row >
constexpr PreparedSTMT (const std::string &name, const std::string &query)
 
constexpr PreparedSTMT (std::string &&name, std::string &&query)
 
 PreparedSTMT (const PreparedSTMT &)=delete
 
constexpr PreparedSTMT (PreparedSTMT &&)=default
 
PreparedSTMToperator= (const PreparedSTMT &)=delete
 
constexpr PreparedSTMToperator= (PreparedSTMT &&)=default
 
constexpr const std::string & GetName () const noexcept
 
constexpr const std::string & GetQuery () const noexcept
 

Friends

class SQLite3
 

Additional Inherited Members

- Protected Attributes inherited from StormByte::Database::PreparedSTMT< Row >
std::string m_name
 Name of the prepared statement.
 
std::string m_query
 Query to prepare.
 
std::unique_ptr< Rowm_row
 Last result row of the prepared statement.
 

Detailed Description

Prepared statement for SQLite.

Constructor & Destructor Documentation

◆ PreparedSTMT() [1/2]

StormByte::Database::SQLite::PreparedSTMT::PreparedSTMT ( const PreparedSTMT )
delete

Copy constructor

◆ PreparedSTMT() [2/2]

StormByte::Database::SQLite::PreparedSTMT::PreparedSTMT ( PreparedSTMT &&  )
defaultnoexcept

Move constructor

◆ ~PreparedSTMT()

StormByte::Database::SQLite::PreparedSTMT::~PreparedSTMT ( )
overridevirtualnoexcept

Destructor

Reimplemented from StormByte::Database::PreparedSTMT< Row >.

Member Function Documentation

◆ Bind() [1/8]

PreparedSTMT & StormByte::Database::SQLite::PreparedSTMT::Bind ( const int &  index,
bool  value 
)
overridevirtualnoexcept

Binds a value to a prepared statement

Parameters
indexparameter index
valueValue to be bound

Implements StormByte::Database::PreparedSTMT< Row >.

◆ Bind() [2/8]

PreparedSTMT & StormByte::Database::SQLite::PreparedSTMT::Bind ( const int &  index,
const double &  value 
)
overridevirtualnoexcept

Binds a value to a prepared statement

Parameters
indexparameter index
valueValue to be bound

Implements StormByte::Database::PreparedSTMT< Row >.

◆ Bind() [3/8]

PreparedSTMT & StormByte::Database::SQLite::PreparedSTMT::Bind ( const int &  index,
const int &  value 
)
overridevirtualnoexcept

Binds a value to a prepared statement

Parameters
indexparameter index
valueValue to be bound

Implements StormByte::Database::PreparedSTMT< Row >.

◆ Bind() [4/8]

PreparedSTMT & StormByte::Database::SQLite::PreparedSTMT::Bind ( const int &  index,
const int64_t &  value 
)
overridevirtualnoexcept

Binds a value to a prepared statement

Parameters
indexparameter index
valueValue to be bound

Implements StormByte::Database::PreparedSTMT< Row >.

◆ Bind() [5/8]

PreparedSTMT & StormByte::Database::SQLite::PreparedSTMT::Bind ( const int &  index,
const std::nullptr_t &  value 
)
overridevirtualnoexcept

Binds a value to a prepared statement

Parameters
indexparameter index
valueValue to be bound

Implements StormByte::Database::PreparedSTMT< Row >.

◆ Bind() [6/8]

PreparedSTMT & StormByte::Database::SQLite::PreparedSTMT::Bind ( const int &  index,
const std::string &  value 
)
overridevirtualnoexcept

Binds a value to a prepared statement

Parameters
indexparameter index
valueValue to be bound

Implements StormByte::Database::PreparedSTMT< Row >.

◆ Bind() [7/8]

PreparedSTMT & StormByte::Database::SQLite::PreparedSTMT::Bind ( const int &  index,
const uint64_t &  value 
)
overridevirtualnoexcept

Binds a value to a prepared statement

Parameters
indexparameter index
valueValue to be bound

Implements StormByte::Database::PreparedSTMT< Row >.

◆ Bind() [8/8]

PreparedSTMT & StormByte::Database::SQLite::PreparedSTMT::Bind ( const int &  index,
const unsigned int &  value 
)
overridevirtualnoexcept

Binds a value to a prepared statement

Parameters
indexparameter index
valueValue to be bound

Implements StormByte::Database::PreparedSTMT< Row >.

◆ operator=() [1/2]

PreparedSTMT & StormByte::Database::SQLite::PreparedSTMT::operator= ( const PreparedSTMT )
delete

Assignment operator

◆ operator=() [2/2]

PreparedSTMT & StormByte::Database::SQLite::PreparedSTMT::operator= ( PreparedSTMT &&  )
defaultnoexcept

Move operator

◆ Reset()

void StormByte::Database::SQLite::PreparedSTMT::Reset ( )
overridevirtualnoexcept

Resets the prepared statement

Implements StormByte::Database::PreparedSTMT< Row >.

◆ Step()

const Row & StormByte::Database::SQLite::PreparedSTMT::Step ( )
overridevirtualnoexcept

Executes the prepared statement

Returns
row pointer (nullptr if there are no more rows)

Implements StormByte::Database::PreparedSTMT< Row >.


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