MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / ExpressionMapper

Class ExpressionMapper

src/include/processor/expression_mapper.h:10–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8namespace processor {
9
10class ExpressionMapper {
11public:
12 ExpressionMapper() = default;
13 explicit ExpressionMapper(const planner::Schema* schema) : schema{schema} {}
14 ExpressionMapper(const planner::Schema* schema, evaluator::ExpressionEvaluator* parent)
15 : schema{schema}, parentEvaluator{parent} {}
16
17 std::unique_ptr<evaluator::ExpressionEvaluator> getEvaluator(
18 std::shared_ptr<binder::Expression> expression);
19 std::unique_ptr<evaluator::ExpressionEvaluator> getConstantEvaluator(
20 std::shared_ptr<binder::Expression> expression);
21
22private:
23 static std::unique_ptr<evaluator::ExpressionEvaluator> getLiteralEvaluator(
24 std::shared_ptr<binder::Expression> expression);
25
26 static std::unique_ptr<evaluator::ExpressionEvaluator> getParameterEvaluator(
27 std::shared_ptr<binder::Expression> expression);
28
29 std::unique_ptr<evaluator::ExpressionEvaluator> getReferenceEvaluator(
30 std::shared_ptr<binder::Expression> expression) const;
31
32 static std::unique_ptr<evaluator::ExpressionEvaluator> getLambdaParamEvaluator(
33 std::shared_ptr<binder::Expression> expression);
34
35 std::unique_ptr<evaluator::ExpressionEvaluator> getCaseEvaluator(
36 std::shared_ptr<binder::Expression> expression);
37
38 std::unique_ptr<evaluator::ExpressionEvaluator> getFunctionEvaluator(
39 std::shared_ptr<binder::Expression> expression);
40
41 std::unique_ptr<evaluator::ExpressionEvaluator> getNodeEvaluator(
42 std::shared_ptr<binder::Expression> expression);
43
44 std::unique_ptr<evaluator::ExpressionEvaluator> getRelEvaluator(
45 std::shared_ptr<binder::Expression> expression);
46
47 std::unique_ptr<evaluator::ExpressionEvaluator> getPathEvaluator(
48 std::shared_ptr<binder::Expression> expression);
49
50 std::vector<std::unique_ptr<evaluator::ExpressionEvaluator>> getEvaluators(
51 const binder::expression_vector& expressions);
52
53private:
54 const planner::Schema* schema = nullptr;
55 // TODO: comment
56 evaluator::ExpressionEvaluator* parentEvaluator = nullptr;
57};
58
59} // namespace processor
60} // namespace lbug

Callers 15

mapIndexLookupMethod · 0.85
mapMergeMethod · 0.85
getNodeSetExecutorMethod · 0.85
getRelSetExecutorMethod · 0.85
getNodeInsertExecutorMethod · 0.85
getRelInsertExecutorMethod · 0.85
mapScanNodeTableMethod · 0.85
mapFilterMethod · 0.85
mapAlterMethod · 0.85
getFunctionEvaluatorMethod · 0.85
mapDummyScanMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected