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