1 | //===----------------------------------------------------------------------===// |
---|---|
2 | // DuckDB |
3 | // |
4 | // duckdb/planner/expression/bound_lambda_expression.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/planner/expression.hpp" |
12 | #include "duckdb/parser/expression/lambda_expression.hpp" |
13 | |
14 | namespace duckdb { |
15 | |
16 | class BoundLambdaExpression : public Expression { |
17 | public: |
18 | static constexpr const ExpressionClass TYPE = ExpressionClass::BOUND_LAMBDA; |
19 | |
20 | public: |
21 | BoundLambdaExpression(ExpressionType type_p, LogicalType return_type_p, unique_ptr<Expression> lambda_expr_p, |
22 | idx_t parameter_count_p); |
23 | |
24 | unique_ptr<Expression> lambda_expr; |
25 | vector<unique_ptr<Expression>> captures; |
26 | idx_t parameter_count; |
27 | |
28 | public: |
29 | string ToString() const override; |
30 | |
31 | bool Equals(const BaseExpression &other) const override; |
32 | |
33 | unique_ptr<Expression> Copy() override; |
34 | |
35 | void Serialize(FieldWriter &writer) const override; |
36 | static unique_ptr<Expression> Deserialize(ExpressionDeserializationState &state, FieldReader &reader); |
37 | }; |
38 | } // namespace duckdb |
39 |