Atlas Game Manager
A game manager for f95 and dlsite written in c++
Loading...
Searching...
No Matches
Binder Class Reference

#include <Binder.hpp>

Public Member Functions

 Binder ()=delete
 
 Binder (const std::string_view sql)
 
template<typename T>
Binderoperator<< (T t)
 
template<typename T>
requires ( (!is_optional< T >) && (!is_tuple< T >))
void operator>> (T &t)
 
template<typename T>
requires ( !is_optional< T > && (!is_tuple< T >))
void operator>> (std::optional< T > &t)
 
template<typename Function>
requires ( (!is_optional< Function >) && (!is_tuple< Function >))
void operator>> (Function &&func)
 
template<typename... Ts>
requires ( !( is_optional< Ts > && ... ) ) && ( !( is_tuple< Ts > && ... ) )
void operator>> (std::tuple< Ts... > &tpl)
 
 ~Binder () noexcept(false)
 

Private Member Functions

template<typename... Ts>
requires ( !( is_optional< Ts > || ... ) && !( is_tuple< Ts > || ... ) )
void executeQuery (std::optional< std::tuple< Ts... > > &tpl_opt)
 

Private Attributes

sqlite3_stmt * stmt { nullptr }
 
int param_counter { 0 }
 
int max_param_count { 0 }
 
bool ran { false }
 

Constructor & Destructor Documentation

◆ Binder() [1/2]

Binder::Binder ( )
delete

◆ Binder() [2/2]

Binder::Binder ( const std::string_view sql)

◆ ~Binder()

Binder::~Binder ( )

Member Function Documentation

◆ executeQuery()

template<typename... Ts>
requires ( !( is_optional< Ts > || ... ) && !( is_tuple< Ts > || ... ) )
void Binder::executeQuery ( std::optional< std::tuple< Ts... > > & tpl_opt)
inlineprivate

◆ operator<<()

template<typename T>
Binder & Binder::operator<< ( T t)
inline

◆ operator>>() [1/4]

template<typename Function>
requires ( (!is_optional< Function >) && (!is_tuple< Function >))
void Binder::operator>> ( Function && func)
inline

◆ operator>>() [2/4]

template<typename T>
requires ( !is_optional< T > && (!is_tuple< T >))
void Binder::operator>> ( std::optional< T > & t)
inline

◆ operator>>() [3/4]

template<typename... Ts>
requires ( !( is_optional< Ts > && ... ) ) && ( !( is_tuple< Ts > && ... ) )
void Binder::operator>> ( std::tuple< Ts... > & tpl)
inline

◆ operator>>() [4/4]

template<typename T>
requires ( (!is_optional< T >) && (!is_tuple< T >))
void Binder::operator>> ( T & t)
inline

Member Data Documentation

◆ max_param_count

int Binder::max_param_count { 0 }
private

◆ param_counter

int Binder::param_counter { 0 }
private

◆ ran

bool Binder::ran { false }
private

◆ stmt

sqlite3_stmt* Binder::stmt { nullptr }
private

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