//===----------------------------------------------------------------------===// // DuckDB // // duckdb/parser/query_node/recursive_cte_node.hpp // // //===----------------------------------------------------------------------===// #pragma once #include "duckdb/parser/parsed_expression.hpp" #include "duckdb/parser/query_node.hpp" #include "duckdb/parser/sql_statement.hpp" namespace duckdb { class RecursiveCTENode : public QueryNode { public: static constexpr const QueryNodeType TYPE = QueryNodeType::RECURSIVE_CTE_NODE; public: RecursiveCTENode() : QueryNode(QueryNodeType::RECURSIVE_CTE_NODE) { } string ctename; bool union_all; //! The left side of the set operation unique_ptr left; //! The right side of the set operation unique_ptr right; //! Aliases of the recursive CTE node vector aliases; const vector> &GetSelectList() const override { return left->GetSelectList(); } public: //! Convert the query node to a string string ToString() const override; bool Equals(const QueryNode *other) const override; //! Create a copy of this SelectNode unique_ptr Copy() const override; //! Serializes a QueryNode to a stand-alone binary blob void Serialize(FieldWriter &writer) const override; //! Deserializes a blob back into a QueryNode static unique_ptr Deserialize(FieldReader &reader); void FormatSerialize(FormatSerializer &serializer) const override; static unique_ptr FormatDeserialize(FormatDeserializer &source); }; } // namespace duckdb