| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/planner/expression/bound_default_expression.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/planner/expression.hpp" |
| 12 | |
| 13 | namespace duckdb { |
| 14 | |
| 15 | class BoundDefaultExpression : public Expression { |
| 16 | public: |
| 17 | static constexpr const ExpressionClass TYPE = ExpressionClass::BOUND_DEFAULT; |
| 18 | |
| 19 | public: |
| 20 | explicit BoundDefaultExpression(LogicalType type = LogicalType()) |
| 21 | : Expression(ExpressionType::VALUE_DEFAULT, ExpressionClass::BOUND_DEFAULT, type) { |
| 22 | } |
| 23 | |
| 24 | public: |
| 25 | bool IsScalar() const override { |
| 26 | return false; |
| 27 | } |
| 28 | bool IsFoldable() const override { |
| 29 | return false; |
| 30 | } |
| 31 | |
| 32 | string ToString() const override { |
| 33 | return "DEFAULT"; |
| 34 | } |
| 35 | |
| 36 | unique_ptr<Expression> Copy() override { |
| 37 | return make_uniq<BoundDefaultExpression>(args&: return_type); |
| 38 | } |
| 39 | |
| 40 | void Serialize(FieldWriter &writer) const override; |
| 41 | static unique_ptr<Expression> Deserialize(ExpressionDeserializationState &state, FieldReader &reader); |
| 42 | }; |
| 43 | } // namespace duckdb |
| 44 |