Go to the documentation of this file.
4 #include <unordered_map>
31 class GenericDataGenerator;
85 std::vector<std::pair<std::string, Join>>
joins;
91 std::unordered_map<std::string, std::string>
columnMap;
121 void setBaseSource(std::string name, std::vector<std::string> columns);
131 void join(std::string name, std::vector<std::string> columns,
132 std::string foreignKey, std::string primaryKey);
std::shared_ptr< Aggregator > AggregatorQuery
Shared pointer to Query Structure.
Definition: AggregatorQuery.h:57
DataSource build()
Definition: GenericQueryBuilder.cpp:134
std::shared_ptr< ConditionQuery > Query
Shared pointer to Query Structure.
Definition: ConditionQuery.h:54
std::shared_ptr< RecordValidatorInterface > RecordValidator
Shared Pointer for RecordValidator Interface.
Definition: Validators.h:39
void setBaseSource(std::string name, std::vector< std::string > columns)
Set the Base Source and the columns required in the query result.
Definition: GenericQueryBuilder.cpp:39
DataType
Different datatypes supported by this project.
Definition: Column.h:16
std::vector< std::string > columns
List of columns required in result from joined source.
Definition: GenericQueryBuilder.h:59
std::string baseSource
Base data source.
Definition: GenericQueryBuilder.h:73
friend class GenericDataAggregator
Definition: GenericQueryBuilder.h:103
Definition: GenericGenerator.h:28
Metadata generateMetadata()
Generates metadata of result records using join and query information.
Definition: GenericQueryBuilder.cpp:95
Generic Condition Builder.
Data Generator for GenericQueryBuilder.
Definition: GenericGenerator.cpp:11
friend class GenericGroupByAggregator
Definition: GenericQueryBuilder.h:104
Struct which maintains metadata of a single column.
Definition: Column.h:22
std::unordered_map< std::string, DataSource > data_sources
map of data source name and data generator
Definition: GenericQueryBuilder.h:66
std::shared_ptr< DataRecordMetadata > Metadata
Shared pointer to DataRecordMetadata.
Definition: DataRecord.h:208
std::shared_ptr< DataGeneratorInterface > DataSource
Shared pointer to the DataGeneratorInterface.
Definition: DataGeneratorInterface.h:73
void where(Query query)
Sets the query object.
Definition: GenericQueryBuilder.cpp:79
Definition: GenericGenerator.h:186
RecordValidator generateRecordValidator()
creates record
Definition: GenericQueryBuilder.cpp:130
Stores a row of data.
Definition: DataRecord.h:64
Base Condition Query Structure.
Definition: ConditionQuery.h:25
void groupBy(std::string name)
Definition: GenericQueryBuilder.h:167
void join(std::string name, std::vector< std::string > columns, std::string foreignKey, std::string primaryKey)
Creates a join from base source to a join source.
Definition: GenericQueryBuilder.cpp:59
RecordValidator Interfaces and Implementations for Query Processing.
void registerDataSource(std::string name, DataSource source)
Registers a new data source and gives is an alias name.
Definition: GenericQueryBuilder.cpp:28
std::string primaryKey
Primary key in join source.
Definition: GenericQueryBuilder.h:57
friend class GenericDataGenerator
Definition: GenericQueryBuilder.h:102
Data Generator Interface.
std::string foreignKey
Foreign key from base source.
Definition: GenericQueryBuilder.h:55
Query query
Query object.
Definition: GenericQueryBuilder.h:97
std::vector< std::string > groupBys
Definition: GenericQueryBuilder.h:100
Generic Condition Builder.
Implementation of a single data element.
Definition: DataRecord.h:28
Generic Query Builder Class.
Definition: GenericQueryBuilder.h:47
std::vector< std::pair< std::string, Join > > joins
List of joins.
Definition: GenericQueryBuilder.h:85
std::unordered_map< std::string, std::string > columnMap
List of columns and their corresponding data source.
Definition: GenericQueryBuilder.h:91
void aggregate(ColumnStore::AggregatorQuery query)
Definition: GenericQueryBuilder.h:163
std::vector< std::string > baseColumns
list of columns from the base table required in result
Definition: GenericQueryBuilder.h:79
Helper struct to represent join infromation.
Definition: GenericQueryBuilder.h:53
Definition: GenericGenerator.h:120
std::vector< ColumnStore::AggregatorQuery > aggregations
Definition: GenericQueryBuilder.h:99