souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
54 class IndexChoice :
public IndexOperation,
public AbstractChoice {
57 Own<Operation> nested, std::string
profileText =
"")
67 pattern =
map(std::move(pattern));
70 pattern =
map(std::move(pattern));
84 resQueryPattern.first.emplace_back(
i->clone());
87 resQueryPattern.second.emplace_back(
i->clone());
95 void print(std::ostream& os,
int tabpos)
const override {
96 os <<
times(
" ", tabpos);
104 bool equal(
const Node& node)
const override {
105 const auto& other =
static_cast<const IndexChoice&
>(node);
const std::string profileText
Text used by the profiler.
void apply(const NodeMapper &map)
bool equal(const Node &node) const override
Equality check for two RAM nodes.
std::pair< std::vector< Expression * >, std::vector< Expression * > > getRangePattern() const
Get range pattern.
std::vector< const Node * > getChildNodes() const override
Obtain list of all embedded child nodes.
Abstract class for a choice operation.
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
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.
std::vector< const Node * > getChildNodes() const override
Obtain list of all embedded child nodes.
const std::string relation
Search relation.
Node is a superclass for all RAM IR classes.
auto clone(const std::vector< A * > &xs)
bool equal(const Node &node) const
An abstract class for manipulating RAM Nodes by substitution.
detail::multiplying_printer< T > times(const T &value, unsigned num)
A utility printing a given value multiple times.
const std::string & getProfileText() const
Get profile text.
bool equal(const Node &node) const override
Equality check for two RAM nodes.
Use an index to find a tuple in a relation such that a given condition holds.
int getTupleId() const
Get identifier.
void printIndex(std::ostream &os) const
Helper method for printing.
std::vector< const Node * > getChildNodes() const
IndexChoice * clone() const override
Create a clone (i.e.
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
RamPattern queryPattern
Values of index per column of table (if indexable)
std::pair< RamBound, RamBound > RamPattern
Own< Condition > condition
Condition for which a tuple in the relation may hold.
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
void rel(size_t limit, bool showLimit=true)
const Condition & getCondition() const
Getter for the condition.
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
IndexChoice(std::string rel, int ident, Own< Condition > cond, RamPattern queryPattern, Own< Operation > nested, std::string profileText="")