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 | Protected Attributes | List of all members
StormByte::Database::Query< Row > Class Template Referenceabstract

Represents a query to be executed in a database. More...

#include <query.hxx>

Inheritance diagram for StormByte::Database::Query< Row >:
Inheritance graph
[legend]

Public Member Functions

constexpr Query (const std::string &query)
 
constexpr Query (std::string &&query)
 
 Query (const Query &)=delete
 
constexpr Query (Query &&)=default
 
Queryoperator= (const Query &)=delete
 
constexpr Queryoperator= (Query &&)=default
 
virtual constexpr ~Query ()=default
 
virtual const RowStep () noexcept=0
 
constexpr const std::string & GetQuery () const noexcept
 

Protected Attributes

std::string m_query
 Query to prepare.
 
std::shared_ptr< Rowm_row
 Current row.
 

Detailed Description

template<class Row>
class StormByte::Database::Query< Row >

Represents a query to be executed in a database.

Constructor & Destructor Documentation

◆ Query() [1/4]

template<class Row >
constexpr StormByte::Database::Query< Row >::Query ( const std::string &  query)
inlineconstexpr

Default constructor

Parameters
queryThe query to prepare

◆ Query() [2/4]

template<class Row >
constexpr StormByte::Database::Query< Row >::Query ( std::string &&  query)
inlineconstexpr

Constructor moving string

Parameters
queryThe query to prepare

◆ Query() [3/4]

template<class Row >
StormByte::Database::Query< Row >::Query ( const Query< Row > &  )
delete

Default copy constructor (deleted)

◆ Query() [4/4]

template<class Row >
constexpr StormByte::Database::Query< Row >::Query ( Query< Row > &&  )
constexprdefault

Default move constructor

◆ ~Query()

template<class Row >
virtual constexpr StormByte::Database::Query< Row >::~Query ( )
constexprvirtualdefault

Default destructor.

Reimplemented in StormByte::Database::SQLite::Query.

Member Function Documentation

◆ GetQuery()

template<class Row >
constexpr const std::string & StormByte::Database::Query< Row >::GetQuery ( ) const
inlineconstexprnoexcept

Gets the query string

Returns
query

◆ operator=() [1/2]

template<class Row >
Query & StormByte::Database::Query< Row >::operator= ( const Query< Row > &  )
delete

Default copy assignment operator (deleted)

◆ operator=() [2/2]

template<class Row >
constexpr Query & StormByte::Database::Query< Row >::operator= ( Query< Row > &&  )
constexprdefault

Default move assignment operator

◆ Step()

template<class Row >
virtual const Row & StormByte::Database::Query< Row >::Step ( )
pure virtualnoexcept

Step into the query results

Implemented in StormByte::Database::SQLite::Query.


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