| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/planner/tableref/bound_cteref.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/planner/bound_tableref.hpp" |
| 12 | |
| 13 | namespace duckdb { |
| 14 | |
| 15 | class BoundCTERef : public BoundTableRef { |
| 16 | public: |
| 17 | static constexpr const TableReferenceType TYPE = TableReferenceType::CTE; |
| 18 | |
| 19 | public: |
| 20 | BoundCTERef(idx_t bind_index, idx_t cte_index) |
| 21 | : BoundTableRef(TableReferenceType::CTE), bind_index(bind_index), cte_index(cte_index) { |
| 22 | } |
| 23 | |
| 24 | //! The set of columns bound to this base table reference |
| 25 | vector<string> bound_columns; |
| 26 | //! The types of the values list |
| 27 | vector<LogicalType> types; |
| 28 | //! The index in the bind context |
| 29 | idx_t bind_index; |
| 30 | //! The index of the cte |
| 31 | idx_t cte_index; |
| 32 | }; |
| 33 | } // namespace duckdb |
| 34 |