//===----------------------------------------------------------------------===// // DuckDB // // duckdb/parser/expression/bound_expression.hpp // // //===----------------------------------------------------------------------===// #pragma once #include "duckdb/common/exception.hpp" #include "duckdb/common/field_writer.hpp" #include "duckdb/parser/parsed_expression.hpp" #include "duckdb/planner/expression.hpp" namespace duckdb { //! BoundExpression is an intermediate dummy class used by the binder. It is a ParsedExpression but holds an Expression. //! It represents a successfully bound expression. It is used in the Binder to prevent re-binding of already bound parts //! when dealing with subqueries. class BoundExpression : public ParsedExpression { public: static constexpr const ExpressionClass TYPE = ExpressionClass::BOUND_EXPRESSION; public: BoundExpression(unique_ptr expr); unique_ptr expr; public: static unique_ptr &GetExpression(ParsedExpression &expr); string ToString() const override; bool Equals(const BaseExpression &other) const override; hash_t Hash() const override; unique_ptr Copy() const override; void Serialize(FieldWriter &writer) const override; void FormatSerialize(FormatSerializer &serializer) const override; }; } // namespace duckdb