LeechCraft  0.6.70-6645-gcd10d7e
Modular cross-platform feature rich live environment.
LeechCraft::Util::oral::detail::MakeSingleBinder< T > Struct Template Reference

#include "oral.h"

+ Collaboration diagram for LeechCraft::Util::oral::detail::MakeSingleBinder< T >:

Public Member Functions

template<typename Vec , typename OrigObj , typename OrigIdx , typename RefObj , typename RefIdx >
auto operator() (Vec vec, const FieldInfo< OrigObj, OrigIdx, RefObj, RefIdx > &) -> decltype(boost::fusion::push_back(vec, WrapAsFunc_t< RefObj, T >
 
selectQuery prepare (query)
 
return boost::fusion::push_back (vec, WrapAsFunc_t< RefObj, T >{inserter})
 

Public Attributes

const CachedFieldsData Data_
 
const auto & query
 
const auto selectQuery = std::make_shared<QSqlQuery> (Data_.DB_)
 
auto inserter
 

Detailed Description

template<typename T>
struct LeechCraft::Util::oral::detail::MakeSingleBinder< T >

Definition at line 1175 of file oral.h.

Member Function Documentation

template<typename T >
return LeechCraft::Util::oral::detail::MakeSingleBinder< T >::boost::fusion::push_back ( vec  ,
WrapAsFunc_t< RefObj, T >{inserter  
)
template<typename T >
template<typename Vec , typename OrigObj , typename OrigIdx , typename RefObj , typename RefIdx >
auto LeechCraft::Util::oral::detail::MakeSingleBinder< T >::operator() ( Vec  vec,
const FieldInfo< OrigObj, OrigIdx, RefObj, RefIdx > &   
) -> decltype (boost::fusion::push_back (vec, WrapAsFunc_t<RefObj, T>
inline

Definition at line 1180 of file oral.h.

template<typename T >
selectQuery LeechCraft::Util::oral::detail::MakeSingleBinder< T >::prepare ( query  )

Member Data Documentation

template<typename T >
const CachedFieldsData LeechCraft::Util::oral::detail::MakeSingleBinder< T >::Data_

Definition at line 1177 of file oral.h.

template<typename T >
auto LeechCraft::Util::oral::detail::MakeSingleBinder< T >::inserter
Initial value:
= [selectQuery, boundName] (const RefObj& obj)
{
selectQuery->bindValue (boundName,
ToVariant<ValueAt_t<RefObj, RefIdx>> {} (boost::fusion::at<RefIdx> (obj)));
return PerformSelect<T> (selectQuery);
}

Definition at line 1190 of file oral.h.

template<typename T >
const auto& LeechCraft::Util::oral::detail::MakeSingleBinder< T >::query
Initial value:
= "SELECT " + QStringList { Data_.Fields_ }.join (", ") +
" FROM " + Data_.Table_ +
" WHERE " + GetFieldName<OrigObj, OrigIdx::value>::value () + " = " + boundName +
";"

Definition at line 1183 of file oral.h.

template<typename T >
const auto LeechCraft::Util::oral::detail::MakeSingleBinder< T >::selectQuery = std::make_shared<QSqlQuery> (Data_.DB_)

Definition at line 1187 of file oral.h.


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