1 | //===----------------------------------------------------------------------===// |
---|---|
2 | // DuckDB |
3 | // |
4 | // duckdb/planner/expression_binder/check_binder.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/parser/column_definition.hpp" |
12 | #include "duckdb/planner/expression_binder.hpp" |
13 | #include "duckdb/common/index_map.hpp" |
14 | #include "duckdb/parser/column_list.hpp" |
15 | |
16 | namespace duckdb { |
17 | //! The CHECK binder is responsible for binding an expression within a CHECK constraint |
18 | class CheckBinder : public ExpressionBinder { |
19 | public: |
20 | CheckBinder(Binder &binder, ClientContext &context, string table, const ColumnList &columns, |
21 | physical_index_set_t &bound_columns); |
22 | |
23 | string table; |
24 | const ColumnList &columns; |
25 | physical_index_set_t &bound_columns; |
26 | |
27 | protected: |
28 | BindResult BindExpression(unique_ptr<ParsedExpression> &expr_ptr, idx_t depth, |
29 | bool root_expression = false) override; |
30 | |
31 | BindResult BindCheckColumn(ColumnRefExpression &expr); |
32 | |
33 | string UnsupportedAggregateMessage() override; |
34 | }; |
35 | |
36 | } // namespace duckdb |
37 |