1 | #include "duckdb/main/relation/subquery_relation.hpp" |
---|---|
2 | #include "duckdb/main/client_context.hpp" |
3 | |
4 | namespace duckdb { |
5 | |
6 | SubqueryRelation::SubqueryRelation(shared_ptr<Relation> child_p, string alias_p) |
7 | : Relation(child_p->context, RelationType::SUBQUERY_RELATION), child(move(child_p)), alias(move(alias_p)) { |
8 | vector<ColumnDefinition> dummy_columns; |
9 | context.TryBindRelation(*this, dummy_columns); |
10 | } |
11 | |
12 | unique_ptr<QueryNode> SubqueryRelation::GetQueryNode() { |
13 | return child->GetQueryNode(); |
14 | } |
15 | |
16 | string SubqueryRelation::GetAlias() { |
17 | return alias; |
18 | } |
19 | |
20 | const vector<ColumnDefinition> &SubqueryRelation::Columns() { |
21 | return child->Columns(); |
22 | } |
23 | |
24 | string SubqueryRelation::ToString(idx_t depth) { |
25 | return child->ToString(depth); |
26 | } |
27 | |
28 | } // namespace duckdb |
29 |