| 1 | //===----------------------------------------------------------------------===// |
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/planner/query_node/bound_recursive_cte_node.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/planner/binder.hpp" |
| 12 | #include "duckdb/planner/bound_query_node.hpp" |
| 13 | |
| 14 | namespace duckdb { |
| 15 | |
| 16 | //! Bound equivalent of SetOperationNode |
| 17 | class BoundRecursiveCTENode : public BoundQueryNode { |
| 18 | public: |
| 19 | BoundRecursiveCTENode() : BoundQueryNode(QueryNodeType::RECURSIVE_CTE_NODE) { |
| 20 | } |
| 21 | |
| 22 | //! Keep track of the CTE name this node represents |
| 23 | string ctename; |
| 24 | |
| 25 | bool union_all; |
| 26 | //! The left side of the set operation |
| 27 | unique_ptr<BoundQueryNode> left; |
| 28 | //! The right side of the set operation |
| 29 | unique_ptr<BoundQueryNode> right; |
| 30 | |
| 31 | //! Index used by the set operation |
| 32 | idx_t setop_index; |
| 33 | //! The binder used by the left side of the set operation |
| 34 | unique_ptr<Binder> left_binder; |
| 35 | //! The binder used by the right side of the set operation |
| 36 | unique_ptr<Binder> right_binder; |
| 37 | |
| 38 | public: |
| 39 | idx_t GetRootIndex() override { |
| 40 | return setop_index; |
| 41 | } |
| 42 | }; |
| 43 | |
| 44 | }; // namespace duckdb |
| 45 | |