1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/main/relation/order_relation.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/main/relation.hpp"
12#include "duckdb/parser/parsed_expression.hpp"
13#include "duckdb/parser/result_modifier.hpp"
14
15namespace duckdb {
16
17class OrderRelation : public Relation {
18public:
19 DUCKDB_API OrderRelation(shared_ptr<Relation> child, vector<OrderByNode> orders);
20
21 vector<OrderByNode> orders;
22 shared_ptr<Relation> child;
23 vector<ColumnDefinition> columns;
24
25public:
26 unique_ptr<QueryNode> GetQueryNode() override;
27
28 const vector<ColumnDefinition> &Columns() override;
29 string ToString(idx_t depth) override;
30 string GetAlias() override;
31
32public:
33 bool InheritsColumnBindings() override {
34 return true;
35 }
36 Relation *ChildRelation() override {
37 return child.get();
38 }
39};
40
41} // namespace duckdb
42