Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
Query< RES >::Builder Class Reference

#include "common/query.hpp"

Description

template<class RES>
class lumiera::Query< RES >::Builder

Helper for establishing, reworking and remolding queries.

Definition at line 456 of file query.hpp.

Public Member Functions

 operator Query< RES > ()
 when done with defining or reworking the query, the result may be retrieved by type conversion
 
string asKey () const
 
string extractID (Symbol predicate) const
 extract an ID term defined as (single) parameter for the given predicate.
 
BuilderremoveTerm (Symbol termPredicate)
 remove the first term from this query definition, which matches the given predicate symbol
 
BuilderwithConditions (string additionalQueryPredicates)
 
BuilderprependConditions (string additionalQueryPredicates)
 
BuilderfromText (string queryPredicates)
 

Friends

class Query< RES >
 

Private Member Functions

 Builder (QueryID kind, string baseDef="")
 

Private Attributes

QueryID typeID_
 
string predicateForm_
 

Constructor & Destructor Documentation

◆ Builder()

template<class RES >
Builder ( QueryID  kind,
string  baseDef = "" 
)
inlineprivate

Definition at line 461 of file query.hpp.

Member Function Documentation

◆ operator Query< RES >()

template<class RES >
operator Query< RES > ( )
inline

when done with defining or reworking the query, the result may be retrieved by type conversion

Definition at line 472 of file query.hpp.

◆ asKey()

template<class RES >
string asKey ( ) const
inline
Returns
a string representation usable for hashing
Note
includes the type parameter of the underlying query

Definition at line 482 of file query.hpp.

Referenced by DefsManager::operator()().

+ Here is the caller graph for this function:

◆ extractID()

template<class RES >
string extractID ( Symbol  predicate) const
inline

extract an ID term defined as (single) parameter for the given predicate.

E.g. when using the query "foo(a), bar(b)", extractID("bar") returns "b"

Parameters
predicatesymbol of the predicate to investigate
Warning
preliminary implementation

Definition at line 496 of file query.hpp.

References lib::query::extractID().

+ Here is the call graph for this function:

◆ removeTerm()

template<class RES >
Builder & removeTerm ( Symbol  termPredicate)
inline

remove the first term from this query definition, which matches the given predicate symbol

Warning
preliminary implementation

Definition at line 507 of file query.hpp.

References lib::query::removeTerm().

Referenced by steam::mobject::_mapping::build_corresponding_sourceQuery(), MockTable::fabricate_Sequence_on_demand(), MockTable::fabricate_Timeline_on_demand(), and LookupPreconfigured::try_special_case().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withConditions()

template<class RES >
Builder & withConditions ( string  additionalQueryPredicates)
inline

Definition at line 514 of file query.hpp.

References lib::query::appendTerms().

+ Here is the call graph for this function:

◆ prependConditions()

template<class RES >
Builder & prependConditions ( string  additionalQueryPredicates)
inline

Definition at line 522 of file query.hpp.

References lib::query::appendTerms().

Referenced by MockTable::fabricate_Sequence_on_demand(), and MockTable::fabricate_Timeline_on_demand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromText()

template<class RES >
Builder & fromText ( string  queryPredicates)
inline

Definition at line 530 of file query.hpp.

Referenced by QueryKey::operator Query< RES >().

+ Here is the caller graph for this function:

Member Data Documentation

◆ typeID_

template<class RES >
QueryID typeID_
private

Definition at line 458 of file query.hpp.

◆ predicateForm_

template<class RES >
string predicateForm_
private

Definition at line 459 of file query.hpp.

Friends And Related Symbol Documentation

◆ Query< RES >

template<class RES >
friend class Query< RES >
friend

Definition at line 461 of file query.hpp.

+ Collaboration diagram for Query< RES >::Builder:

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