JODA
0.13.1 (59b41972)
JSON On-Demand Analysis
|
#include <Query.h>
Public Member Functions | |
Query () | |
bool | check (const RapidJsonDocument &json) const |
const std::string & | getLoad () const |
void | setLoad (const std::string &load) |
const std::string & | getDelete () const |
void | setDelete (const std::string &del) |
void | setPredicate (std::unique_ptr< Predicate > &&predicate) |
std::unique_ptr< Predicate > | getPredicate () const |
void | addProjection (std::unique_ptr< IProjector > &&expr) |
const std::vector< std::unique_ptr< IProjector > > & | getProjectors () const |
void | addProjection (std::unique_ptr< ISetProjector > &&expr) |
const std::vector< std::unique_ptr< ISetProjector > > & | getSetProjectors () const |
void | addAggregator (std::unique_ptr< IAggregator > &&agg) |
bool | hasAggregators () |
const std::vector< std::unique_ptr< IAggregator > > & | getAggregators () const |
const std::vector< std::unique_ptr< docparsing::IImportSource > > & | getImportSources () const |
void | addImportSource (std::unique_ptr< docparsing::IImportSource > &&source) |
const std::shared_ptr< JoinManager > & | getLoadJoinManager () const |
void | setLoadJoinManager (const std::shared_ptr< JoinManager > &loadJoinManager) |
const std::shared_ptr< JoinManager > & | getStoreJoinManager () const |
void | setStoreJoinManager (const std::shared_ptr< JoinManager > &storeJoinManager) |
std::unique_ptr< IExportDestination > & | getExportDestination () |
void | setExportDestination (std::unique_ptr< IExportDestination > &&exportDestination) |
bool | isDefault () const |
bool | chooseIsConst (bool &val) const |
bool | canCreateView () const |
std::string | toString () const |
std::vector< std::string > | getAllUsedAttributes () const |
std::vector< std::string > | getChooseAttributes () const |
std::vector< std::string > | getASAttributes () const |
std::vector< std::string > | getAGGAttributes () const |
Protected Attributes | |
std::vector< std::unique_ptr< docparsing::IImportSource > > | importSources {} |
std::string | load {} |
std::shared_ptr< JoinManager > | loadJoinManager = nullptr |
std::unique_ptr< Predicate > | pred = nullptr |
std::vector< std::unique_ptr< IProjector > > | projectors {} |
std::vector< std::unique_ptr< ISetProjector > > | setProjectors {} |
std::vector< std::unique_ptr< IAggregator > > | aggregators {} |
std::unique_ptr< IExportDestination > | exportDestination |
std::shared_ptr< JoinManager > | storeJoinManager = nullptr |
std::string | store |
std::string | del |
This class represents the parsed representation of a JODA Query.
It contains all information required to execute a user query.
joda::query::Query::Query | ( | ) |
The default constructor constructs an empty default query.
void joda::query::Query::addAggregator | ( | std::unique_ptr< IAggregator > && | agg | ) |
Adds a Aggregator to the query
agg | The aggregator to add |
void joda::query::Query::addImportSource | ( | std::unique_ptr< docparsing::IImportSource > && | source | ) |
void joda::query::Query::addProjection | ( | std::unique_ptr< IProjector > && | expr | ) |
Adds a Projection expression to the query
expr | The projection to add |
void joda::query::Query::addProjection | ( | std::unique_ptr< ISetProjector > && | expr | ) |
Adds a SetProjection expression to the query
expr | The setprojection to add |
bool joda::query::Query::canCreateView | ( | ) | const |
Checks whether the AS transformations can be evaluated with views.
bool joda::query::Query::check | ( | const RapidJsonDocument & | json | ) | const |
This function checks if the given document fulfils the CHOOSE predicate of the query.
doc | The document to check |
bool joda::query::Query::chooseIsConst | ( | bool & | val | ) | const |
Checks whether the CHOOSE predicate can be evaluated without documents. If yes, the result of the predicate is written to val.
val | A variable which will contain the result of the const predicate. |
std::vector< std::string > joda::query::Query::getAGGAttributes | ( | ) | const |
const std::vector< std::unique_ptr< joda::query::IAggregator > > & joda::query::Query::getAggregators | ( | ) | const |
std::vector< std::string > joda::query::Query::getAllUsedAttributes | ( | ) | const |
std::vector< std::string > joda::query::Query::getASAttributes | ( | ) | const |
std::vector< std::string > joda::query::Query::getChooseAttributes | ( | ) | const |
const std::string & joda::query::Query::getDelete | ( | ) | const |
std::unique_ptr< IExportDestination > & joda::query::Query::getExportDestination | ( | ) |
const std::vector< std::unique_ptr< joda::docparsing::IImportSource > > & joda::query::Query::getImportSources | ( | ) | const |
const std::string & joda::query::Query::getLoad | ( | ) | const |
const std::shared_ptr< JoinManager > & joda::query::Query::getLoadJoinManager | ( | ) | const |
std::unique_ptr< joda::query::Predicate > joda::query::Query::getPredicate | ( | ) | const |
const std::vector< std::unique_ptr< joda::query::IProjector > > & joda::query::Query::getProjectors | ( | ) | const |
const std::vector< std::unique_ptr< joda::query::ISetProjector > > & joda::query::Query::getSetProjectors | ( | ) | const |
const std::shared_ptr< JoinManager > & joda::query::Query::getStoreJoinManager | ( | ) | const |
bool joda::query::Query::hasAggregators | ( | ) |
bool joda::query::Query::isDefault | ( | ) | const |
void joda::query::Query::setDelete | ( | const std::string & | del | ) |
del | the name of the collection which should be deleted after the query, or "" if none |
void joda::query::Query::setExportDestination | ( | std::unique_ptr< IExportDestination > && | exportDestination | ) |
void joda::query::Query::setLoad | ( | const std::string & | load | ) |
load | the name of the collection on which this query is based. |
void joda::query::Query::setLoadJoinManager | ( | const std::shared_ptr< JoinManager > & | loadJoinManager | ) |
void joda::query::Query::setPredicate | ( | std::unique_ptr< Predicate > && | predicate | ) |
predicate | the predicate of the CHOOSE expression |
void joda::query::Query::setStoreJoinManager | ( | const std::shared_ptr< JoinManager > & | storeJoinManager | ) |
std::string joda::query::Query::toString | ( | ) | const |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |