1 | //===----------------------------------------------------------------------===// |
---|---|
2 | // DuckDB |
3 | // |
4 | // duckdb/parser/parsed_expression_iterator.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/parser/parsed_expression.hpp" |
12 | #include "duckdb/parser/tokens.hpp" |
13 | |
14 | #include <functional> |
15 | |
16 | namespace duckdb { |
17 | |
18 | class ParsedExpressionIterator { |
19 | public: |
20 | static void EnumerateChildren(const ParsedExpression &expression, |
21 | const std::function<void(const ParsedExpression &child)> &callback); |
22 | static void EnumerateChildren(ParsedExpression &expr, const std::function<void(ParsedExpression &child)> &callback); |
23 | static void EnumerateChildren(ParsedExpression &expr, |
24 | const std::function<void(unique_ptr<ParsedExpression> &child)> &callback); |
25 | |
26 | static void EnumerateTableRefChildren(TableRef &ref, |
27 | const std::function<void(unique_ptr<ParsedExpression> &child)> &callback); |
28 | static void EnumerateQueryNodeChildren(QueryNode &node, |
29 | const std::function<void(unique_ptr<ParsedExpression> &child)> &callback); |
30 | |
31 | static void EnumerateQueryNodeModifiers(QueryNode &node, |
32 | const std::function<void(unique_ptr<ParsedExpression> &child)> &callback); |
33 | }; |
34 | |
35 | } // namespace duckdb |
36 |