|
|
ExpressionClass | expr_class |
| | The ExpressionClass of the to-be-matched expression. ExpressionClass::INVALID for ANY.
|
|
unique_ptr< ExpressionTypeMatcher > | expr_type |
| | Matcher for the ExpressionType of the operator (nullptr for ANY).
|
|
unique_ptr< TypeMatcher > | type |
| | Matcher for the return_type of the expression (nullptr for ANY).
|
◆ RecursiveFunctionExpressionMatcher()
320010 : func_matchers(std::move(func_matchers)) {
320011 }
◆ Match()
Checks if the given expression matches this ExpressionMatcher. If it does, the expression is appended to the bindings list and true is returned. Otherwise, false is returned.
Reimplemented from duckdb::ExpressionMatcher.
320012 {
320013 FunctionExpressionMatcher *target_matcher = nullptr;
320014 for (const auto &matcher : func_matchers) {
320015 if (matcher->Match(expr, bindings)) {
320016 target_matcher = matcher.get();
320017 break;
320018 }
320019 }
320020 if (target_matcher == nullptr) {
320021 return false;
320022 }
320023 bindings.clear();
320024 RecursiveMatch(target_matcher, expr, bindings);
320025 bindings.push_back(expr);
320026 return true;
320027 }
◆ RecursiveMatch()
320031 {
320032 vector<reference<Expression>> curr_bindings;
320033 if (func_matcher->Match(expr, curr_bindings)) {
320034 auto &func_expr = expr.Cast<BoundFunctionExpression>();
320035 for (auto &child : func_expr.children) {
320036 RecursiveMatch(func_matcher, *(child.get()), bindings);
320037 }
320038 } else {
320039 bindings.push_back(expr);
320040 }
320041 }
The documentation for this class was generated from the following file: