LeechCraft  0.6.70-6645-gcd10d7e
Modular cross-platform feature rich live environment.
LeechCraft::Util::oral::detail Namespace Reference

Classes

struct  AdaptInsert
 
struct  CachedFieldsData
 
struct  CollectRefs
 
struct  CollectRefs_
 
struct  CollectRefs_< Seq, typename boost::fusion::result_of::size< Seq >::type >
 
class  DeleteByFieldsWrapper
 
class  ExprTree
 
class  ExprTree< ExprType::LeafData, T, void >
 
class  ExprTree< ExprType::LeafStaticPlaceholder, boost::mpl::int_< Idx >, void >
 
struct  ExtrObj
 
struct  ExtrObj< FieldInfo< OrigSeq, OrigIdx, RefSeq, MemberIdx > >
 
struct  FieldAppender
 
struct  FieldAppender< To, OrigSeq, OrigIdx, References< RefSeq, RefIdx > >
 
struct  FieldInfo
 
struct  FieldsUnpacker
 
struct  FieldsUnpacker< HeadT >
 
struct  FindPKey
 
struct  GetBoundName
 
struct  GetFieldName
 
struct  GetFieldsNames
 
struct  GetFieldsNames_
 
struct  GetFieldsNames_< S, typename boost::fusion::result_of::size< S >::type >
 
struct  Inserter
 
struct  IsCompatible
 
struct  IsCompatible< Type, ExprType::And >
 
struct  IsCompatible< Type, ExprType::LeafData >
 
struct  IsCompatible< Type, ExprType::LeafStaticPlaceholder >
 
struct  IsCompatible< Type, ExprType::Or >
 
struct  IsExprTree
 
struct  IsExprTree< ExprTree< Type, L, R > >
 
struct  IsLeaf
 
struct  IsLeaf< ExprType::LeafData >
 
struct  IsLeaf< ExprType::LeafStaticPlaceholder >
 
struct  IsPKey
 
struct  IsPKey< PKey< U, Tags... > >
 
struct  Lazy
 
struct  MakeBinder
 
struct  MakeSingleBinder
 
struct  Ref2Select
 
struct  RelationalTypesChecker
 
struct  RelationalTypesChecker< Type, Seq, L, R, EnableIf_t< IsRelational(Type)> >
 
struct  RelationalTypesCheckerBase
 
class  SelectByFieldsWrapper
 
class  SelectOneByFieldsWrapper
 
struct  Selector
 
struct  SingleBind
 
struct  ToSqlState
 
struct  Types
 
struct  ValueBinder
 
struct  ValueBinder< FieldsUnpacker, HeadArg >
 
struct  WrapAsFunc
 

Typedefs

template<typename Seq , int Idx>
using ValueAtC_t = typename boost::fusion::result_of::value_at_c< Seq, Idx >::type
 
template<typename Seq , typename Idx >
using ValueAt_t = typename boost::fusion::result_of::value_at< Seq, Idx >::type
 
template<typename T , typename Ret >
using WrapAsFunc_t = typename WrapAsFunc< T, Ret >::type
 
using transform_view = typename boost::mpl::transform< objects_vector, WrapAsFunc< boost::mpl::_1, T >>::type
 

Enumerations

enum  ExprType {
  ExprType::LeafStaticPlaceholder,
  ExprType::LeafData,
  ExprType::Greater,
  ExprType::Less,
  ExprType::Equal,
  ExprType::Geq,
  ExprType::Leq,
  ExprType::Neq,
  ExprType::And,
  ExprType::Or
}
 

Functions

template<typename T >
QString MorphFieldNameImpl (const QString &str, int, decltype(&T::FieldNameMorpher)*=nullptr)
 
template<typename T >
QString MorphFieldNameImpl (const QString &str, float)
 
template<typename T >
QString MorphFieldName (const QString &str)
 
template<typename T >
std::function< void(T)> MakeInserter (CachedFieldsData data, QSqlQuery_ptr insertQuery, bool bindPrimaryKey)
 
template<typename Seq , int Idx = FindPKey<Seq>::result_type::value>
constexpr bool HasAutogenPKeyImpl (int)
 
template<typename >
constexpr bool HasAutogenPKeyImpl (float)
 
template<typename Seq >
constexpr bool HasAutogenPKey ()
 
QString GetInsertPrefix (InsertAction action)
 
template<typename T >
std::function< void(T)> AdaptUpdate (const CachedFieldsData &data)
 
template<typename T >
std::function< void(T)> AdaptDelete (CachedFieldsData data)
 
template<typename T >
QList< T > PerformSelect (QSqlQuery_ptr q)
 
template<typename T >
std::function< QList< T >)> AdaptSelectAll (const CachedFieldsData &data)
 
QString TypeToSql (ExprType type)
 
template<typename T >
constexpr T Ctfy (T t)
 
template<ExprType T1, ExprType T2>
constexpr bool CheckCompatible ()
 
constexpr bool IsRelational (ExprType type)
 
template<typename Seq , typename L , typename R >
constexpr bool AreComparableTypesImpl (int, decltype(std::declval< typename L::template ValueType_t< Seq >>()==std::declval< typename R::template ValueType_t< Seq >>())*=nullptr)
 
template<typename Seq , typename L , typename R >
constexpr bool AreComparableTypesImpl (float)
 
template<typename Seq , typename L , typename R >
constexpr bool AreComparableTypes ()
 
template<ExprType LType, typename LL , typename LR , ExprType RType, typename RL , typename RR >
ExprTree< ExprType::Less, ExprTree< LType, LL, LR >, ExprTree< RType, RL, RR > > operator< (const ExprTree< LType, LL, LR > &left, const ExprTree< RType, RL, RR > &right)
 
template<ExprType LType, typename LL , typename LR , typename R >
ExprTree< ExprType::Less, ExprTree< LType, LL, LR >, ExprTree< ExprType::LeafData, R > > operator< (const ExprTree< LType, LL, LR > &left, const R &right)
 
template<ExprType RType, typename RL , typename RR , typename L >
ExprTree< ExprType::Less, ExprTree< ExprType::LeafData, L >, ExprTree< RType, RL, RR > > operator< (const L &left, const ExprTree< RType, RL, RR > &right)
 
template<ExprType LType, typename LL , typename LR , ExprType RType, typename RL , typename RR >
ExprTree< ExprType::Equal, ExprTree< LType, LL, LR >, ExprTree< RType, RL, RR > > operator== (const ExprTree< LType, LL, LR > &left, const ExprTree< RType, RL, RR > &right)
 
template<ExprType LType, typename LL , typename LR , typename R >
ExprTree< ExprType::Equal, ExprTree< LType, LL, LR >, ExprTree< ExprType::LeafData, R > > operator== (const ExprTree< LType, LL, LR > &left, const R &right)
 
template<ExprType RType, typename RL , typename RR , typename L >
ExprTree< ExprType::Equal, ExprTree< ExprType::LeafData, L >, ExprTree< RType, RL, RR > > operator== (const L &left, const ExprTree< RType, RL, RR > &right)
 
template<ExprType LType, typename LL , typename LR , ExprType RType, typename RL , typename RR >
ExprTree< ExprType::And, ExprTree< LType, LL, LR >, ExprTree< RType, RL, RR > > operator&& (const ExprTree< LType, LL, LR > &left, const ExprTree< RType, RL, RR > &right)
 
template<ExprType LType, typename LL , typename LR , typename R >
ExprTree< ExprType::And, ExprTree< LType, LL, LR >, ExprTree< ExprType::LeafData, R > > operator&& (const ExprTree< LType, LL, LR > &left, const R &right)
 
template<ExprType RType, typename RL , typename RR , typename L >
ExprTree< ExprType::And, ExprTree< ExprType::LeafData, L >, ExprTree< RType, RL, RR > > operator&& (const L &left, const ExprTree< RType, RL, RR > &right)
 
template<typename Seq , ExprType Type, typename L , typename R >
QPair< QString, std::function< void(QSqlQuery_ptr)> > HandleExprTree (const ExprTree< Type, L, R > &tree)
 
template<typename T >
SelectByFieldsWrapper< T > AdaptSelectFields (const CachedFieldsData &data)
 
template<typename T >
SelectOneByFieldsWrapper< T > AdaptSelectOneFields (const CachedFieldsData &data)
 
template<typename T >
DeleteByFieldsWrapper< T > AdaptDeleteFields (const CachedFieldsData &data)
 
template<typename T , typename ObjInfo >
std::enable_if< CollectRefs< T >::type_list::size::value==1 >::type AdaptSelectRef (const CachedFieldsData &data, ObjInfo &info)
 

Variables

std::function< QList< T >objects_vector)> SelectByFKeysActor_
 
boost::fusion::result_of::as_vector< transform_view >::type SingleFKeySelectors_
 

Typedef Documentation

using LeechCraft::Util::oral::detail::transform_view = typedef typename boost::mpl::transform<objects_vector, WrapAsFunc<boost::mpl::_1, T>>::type

Definition at line 1311 of file oral.h.

template<typename Seq , typename Idx >
using LeechCraft::Util::oral::detail::ValueAt_t = typedef typename boost::fusion::result_of::value_at<Seq, Idx>::type

Definition at line 406 of file oral.h.

template<typename Seq , int Idx>
using LeechCraft::Util::oral::detail::ValueAtC_t = typedef typename boost::fusion::result_of::value_at_c<Seq, Idx>::type

Definition at line 403 of file oral.h.

template<typename T , typename Ret >
using LeechCraft::Util::oral::detail::WrapAsFunc_t = typedef typename WrapAsFunc<T, Ret>::type

Definition at line 1172 of file oral.h.

Enumeration Type Documentation

Enumerator
LeafStaticPlaceholder 
LeafData 
Greater 
Less 
Equal 
Geq 
Leq 
Neq 
And 
Or 

Definition at line 641 of file oral.h.

Function Documentation

template<typename T >
DeleteByFieldsWrapper<T> LeechCraft::Util::oral::detail::AdaptDeleteFields ( const CachedFieldsData data)

Definition at line 1053 of file oral.h.

template<typename T >
std::function<QList<T>)> LeechCraft::Util::oral::detail::AdaptSelectAll ( const CachedFieldsData data)
template<typename T >
SelectByFieldsWrapper<T> LeechCraft::Util::oral::detail::AdaptSelectFields ( const CachedFieldsData data)

Definition at line 1041 of file oral.h.

template<typename T >
SelectOneByFieldsWrapper<T> LeechCraft::Util::oral::detail::AdaptSelectOneFields ( const CachedFieldsData data)

Definition at line 1047 of file oral.h.

template<typename T , typename ObjInfo >
std::enable_if<CollectRefs<T>::type_list::size::value == 1>::type LeechCraft::Util::oral::detail::AdaptSelectRef ( const CachedFieldsData data,
ObjInfo &  info 
)
template<typename T >
std::function<void (T)> LeechCraft::Util::oral::detail::AdaptUpdate ( const CachedFieldsData data)
template<typename Seq , typename L , typename R >
constexpr bool LeechCraft::Util::oral::detail::AreComparableTypes ( )

Definition at line 756 of file oral.h.

template<typename Seq , typename L , typename R >
constexpr bool LeechCraft::Util::oral::detail::AreComparableTypesImpl ( int  ,
decltype(std::declval< typename L::template ValueType_t< Seq >>()==std::declval< typename R::template ValueType_t< Seq >>())*  = nullptr 
)

Definition at line 743 of file oral.h.

template<typename Seq , typename L , typename R >
constexpr bool LeechCraft::Util::oral::detail::AreComparableTypesImpl ( float  )

Definition at line 750 of file oral.h.

template<ExprType T1, ExprType T2>
constexpr bool LeechCraft::Util::oral::detail::CheckCompatible ( )

Definition at line 720 of file oral.h.

template<typename T >
constexpr T LeechCraft::Util::oral::detail::Ctfy ( t)

Definition at line 714 of file oral.h.

QString LeechCraft::Util::oral::detail::GetInsertPrefix ( InsertAction  action)

Definition at line 439 of file oral.h.

References LeechCraft::Util::oral::Default, LeechCraft::Util::oral::Ignore, and LeechCraft::Util::oral::Replace.

Referenced by LeechCraft::Util::oral::detail::AdaptInsert< T >::operator()().

+ Here is the caller graph for this function:

template<typename Seq , ExprType Type, typename L , typename R >
QPair<QString, std::function<void (QSqlQuery_ptr)> > LeechCraft::Util::oral::detail::HandleExprTree ( const ExprTree< Type, L, R > &  tree)

Definition at line 896 of file oral.h.

References LeechCraft::Util::Stlize(), and LeechCraft::Util::oral::detail::ExprTree< Type, L, R >::ToSql().

+ Here is the call graph for this function:

template<typename Seq >
constexpr bool LeechCraft::Util::oral::detail::HasAutogenPKey ( )

Definition at line 434 of file oral.h.

template<typename Seq , int Idx = FindPKey<Seq>::result_type::value>
constexpr bool LeechCraft::Util::oral::detail::HasAutogenPKeyImpl ( int  )

Definition at line 422 of file oral.h.

template<typename >
constexpr bool LeechCraft::Util::oral::detail::HasAutogenPKeyImpl ( float  )

Definition at line 428 of file oral.h.

constexpr bool LeechCraft::Util::oral::detail::IsRelational ( ExprType  type)

Definition at line 725 of file oral.h.

template<typename T >
std::function<void (T)> LeechCraft::Util::oral::detail::MakeInserter ( CachedFieldsData  data,
QSqlQuery_ptr  insertQuery,
bool  bindPrimaryKey 
)
template<typename T >
QString LeechCraft::Util::oral::detail::MorphFieldName ( const QString &  str)

Definition at line 115 of file oral.h.

template<typename T >
QString LeechCraft::Util::oral::detail::MorphFieldNameImpl ( const QString &  str,
int  ,
decltype &::FieldNameMorpher *  = nullptr 
)

Definition at line 103 of file oral.h.

template<typename T >
QString LeechCraft::Util::oral::detail::MorphFieldNameImpl ( const QString &  str,
float   
)

Definition at line 109 of file oral.h.

template<ExprType LType, typename LL , typename LR , ExprType RType, typename RL , typename RR >
ExprTree<ExprType::And, ExprTree<LType, LL, LR>, ExprTree<RType, RL, RR> > LeechCraft::Util::oral::detail::operator&& ( const ExprTree< LType, LL, LR > &  left,
const ExprTree< RType, RL, RR > &  right 
)

Definition at line 878 of file oral.h.

template<ExprType LType, typename LL , typename LR , typename R >
ExprTree<ExprType::And, ExprTree<LType, LL, LR>, ExprTree<ExprType::LeafData, R> > LeechCraft::Util::oral::detail::operator&& ( const ExprTree< LType, LL, LR > &  left,
const R &  right 
)

Definition at line 884 of file oral.h.

template<ExprType RType, typename RL , typename RR , typename L >
ExprTree<ExprType::And, ExprTree<ExprType::LeafData, L>, ExprTree<RType, RL, RR> > LeechCraft::Util::oral::detail::operator&& ( const L &  left,
const ExprTree< RType, RL, RR > &  right 
)

Definition at line 890 of file oral.h.

template<ExprType RType, typename RL , typename RR , typename L >
ExprTree<ExprType::Less, ExprTree<ExprType::LeafData, L>, ExprTree<RType, RL, RR> > LeechCraft::Util::oral::detail::operator< ( const L &  left,
const ExprTree< RType, RL, RR > &  right 
)

Definition at line 853 of file oral.h.

template<ExprType LType, typename LL , typename LR , ExprType RType, typename RL , typename RR >
ExprTree<ExprType::Less, ExprTree<LType, LL, LR>, ExprTree<RType, RL, RR> > LeechCraft::Util::oral::detail::operator< ( const ExprTree< LType, LL, LR > &  left,
const ExprTree< RType, RL, RR > &  right 
)

Definition at line 840 of file oral.h.

template<ExprType LType, typename LL , typename LR , typename R >
ExprTree<ExprType::Less, ExprTree<LType, LL, LR>, ExprTree<ExprType::LeafData, R> > LeechCraft::Util::oral::detail::operator< ( const ExprTree< LType, LL, LR > &  left,
const R &  right 
)

Definition at line 847 of file oral.h.

template<ExprType LType, typename LL , typename LR , ExprType RType, typename RL , typename RR >
ExprTree<ExprType::Equal, ExprTree<LType, LL, LR>, ExprTree<RType, RL, RR> > LeechCraft::Util::oral::detail::operator== ( const ExprTree< LType, LL, LR > &  left,
const ExprTree< RType, RL, RR > &  right 
)

Definition at line 859 of file oral.h.

template<ExprType LType, typename LL , typename LR , typename R >
ExprTree<ExprType::Equal, ExprTree<LType, LL, LR>, ExprTree<ExprType::LeafData, R> > LeechCraft::Util::oral::detail::operator== ( const ExprTree< LType, LL, LR > &  left,
const R &  right 
)

Definition at line 866 of file oral.h.

template<ExprType RType, typename RL , typename RR , typename L >
ExprTree<ExprType::Equal, ExprTree<ExprType::LeafData, L>, ExprTree<RType, RL, RR> > LeechCraft::Util::oral::detail::operator== ( const L &  left,
const ExprTree< RType, RL, RR > &  right 
)

Definition at line 872 of file oral.h.

template<typename T >
QList<T> LeechCraft::Util::oral::detail::PerformSelect ( QSqlQuery_ptr  q)

Definition at line 576 of file oral.h.

QString LeechCraft::Util::oral::detail::TypeToSql ( ExprType  type)

Definition at line 657 of file oral.h.

Referenced by LeechCraft::Util::oral::detail::ExprTree< Type, L, R >::ToSql().

+ Here is the caller graph for this function:

Variable Documentation

std::function<QList<T>objects_vector)> LeechCraft::Util::oral::detail::SelectByFKeysActor_

Definition at line 1309 of file oral.h.

boost::fusion::result_of::as_vector<transform_view>::type LeechCraft::Util::oral::detail::SingleFKeySelectors_

Definition at line 1312 of file oral.h.