souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
47 class IndexAggregate :
public IndexOperation,
public AbstractAggregate {
57 res.insert(res.end(), children.begin(), children.end());
64 pattern.first.emplace_back(
i->clone());
67 pattern.second.emplace_back(
i->clone());
73 void apply(
const NodeMapper&
map)
override {
80 void print(std::ostream& os,
int tabpos)
const override {
81 os <<
times(
" ", tabpos);
93 bool equal(
const Node& node)
const override {
std::vector< const Node * > getChildNodes() const override
Obtain list of all embedded child nodes.
bool equal(const Node &node) const
std::vector< const Node * > getChildNodes() const override
Obtain list of all embedded child nodes.
const Condition & getCondition() const
Get condition.
AggregateOp
Types of aggregation functions.
Operation & getOperation() const
Get nested operation.
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
bool equal(const Node &node) const override
Equality check for two RAM nodes.
void print(std::ostream &os, int) const
const std::string relation
Search relation.
Abstract class for aggregation.
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
auto clone(const std::vector< A * > &xs)
detail::multiplying_printer< T > times(const T &value, unsigned num)
A utility printing a given value multiple times.
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
bool equal(const Node &node) const override
Equality check for two RAM nodes.
Own< Expression > expression
Aggregation expression.
Indexed aggregation on a relation. The index allows us to iterate over a restricted range.
int getTupleId() const
Get identifier.
void printIndex(std::ostream &os) const
Helper method for printing.
bool isTrue(const Condition *cond)
Determines if a condition represents true.
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
RamPattern queryPattern
Values of index per column of table (if indexable)
std::pair< RamBound, RamBound > RamPattern
IndexAggregate(Own< Operation > nested, AggregateOp fun, std::string rel, Own< Expression > expression, Own< Condition > condition, RamPattern queryPattern, int ident)
IndexAggregate * clone() const override
Create a clone (i.e.
std::vector< const Node * > getChildNodes() const
void rel(size_t limit, bool showLimit=true)
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
Own< Condition > condition
Aggregation tuple condition.