| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/planner/expression_binder/index_binder.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/planner/expression_binder.hpp" |
| 12 | #include "duckdb/common/unordered_map.hpp" |
| 13 | #include "duckdb/parser/parsed_data/create_index_info.hpp" |
| 14 | #include "duckdb/catalog/catalog_entry/table_catalog_entry.hpp" |
| 15 | |
| 16 | namespace duckdb { |
| 17 | class BoundColumnRefExpression; |
| 18 | |
| 19 | //! The IndexBinder is responsible for binding an expression within an index statement |
| 20 | class IndexBinder : public ExpressionBinder { |
| 21 | public: |
| 22 | IndexBinder(Binder &binder, ClientContext &context, optional_ptr<TableCatalogEntry> table = nullptr, |
| 23 | optional_ptr<CreateIndexInfo> info = nullptr); |
| 24 | |
| 25 | protected: |
| 26 | BindResult BindExpression(unique_ptr<ParsedExpression> &expr_ptr, idx_t depth, |
| 27 | bool root_expression = false) override; |
| 28 | string UnsupportedAggregateMessage() override; |
| 29 | |
| 30 | private: |
| 31 | // only for WAL replay |
| 32 | optional_ptr<TableCatalogEntry> table; |
| 33 | optional_ptr<CreateIndexInfo> info; |
| 34 | }; |
| 35 | |
| 36 | } // namespace duckdb |
| 37 |