1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/parser/expression/parameter_expression.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/parser/parsed_expression.hpp"
12
13namespace duckdb {
14class ParameterExpression : public ParsedExpression {
15public:
16 static constexpr const ExpressionClass TYPE = ExpressionClass::PARAMETER;
17
18public:
19 ParameterExpression();
20
21 idx_t parameter_nr;
22
23public:
24 bool IsScalar() const override {
25 return true;
26 }
27 bool HasParameter() const override {
28 return true;
29 }
30
31 string ToString() const override;
32
33 static bool Equal(const ParameterExpression &a, const ParameterExpression &b);
34
35 unique_ptr<ParsedExpression> Copy() const override;
36 hash_t Hash() const override;
37
38 void Serialize(FieldWriter &writer) const override;
39 static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
40 void FormatSerialize(FormatSerializer &serializer) const override;
41 static unique_ptr<ParsedExpression> FormatDeserialize(ExpressionType type, FormatDeserializer &deserializer);
42};
43} // namespace duckdb
44