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