| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/main/relation/join_relation.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/main/relation.hpp" |
| 12 | |
| 13 | namespace duckdb { |
| 14 | |
| 15 | class JoinRelation : public Relation { |
| 16 | public: |
| 17 | DUCKDB_API JoinRelation(shared_ptr<Relation> left, shared_ptr<Relation> right, |
| 18 | unique_ptr<ParsedExpression> condition, JoinType type); |
| 19 | DUCKDB_API JoinRelation(shared_ptr<Relation> left, shared_ptr<Relation> right, vector<string> using_columns, |
| 20 | JoinType type); |
| 21 | |
| 22 | shared_ptr<Relation> left; |
| 23 | shared_ptr<Relation> right; |
| 24 | unique_ptr<ParsedExpression> condition; |
| 25 | vector<string> using_columns; |
| 26 | JoinType join_type; |
| 27 | vector<ColumnDefinition> columns; |
| 28 | |
| 29 | public: |
| 30 | unique_ptr<QueryNode> GetQueryNode() override; |
| 31 | |
| 32 | const vector<ColumnDefinition> &Columns() override; |
| 33 | string ToString(idx_t depth) override; |
| 34 | |
| 35 | unique_ptr<TableRef> GetTableRef() override; |
| 36 | }; |
| 37 | |
| 38 | } // namespace duckdb |
| 39 |