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