1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/planner/tableref/bound_subqueryref.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/planner/binder.hpp"
12#include "duckdb/planner/bound_query_node.hpp"
13#include "duckdb/planner/bound_tableref.hpp"
14
15namespace duckdb {
16
17//! Represents a cross product
18class BoundSubqueryRef : public BoundTableRef {
19public:
20 static constexpr const TableReferenceType TYPE = TableReferenceType::SUBQUERY;
21
22public:
23 BoundSubqueryRef(shared_ptr<Binder> binder_p, unique_ptr<BoundQueryNode> subquery)
24 : BoundTableRef(TableReferenceType::SUBQUERY), binder(std::move(binder_p)), subquery(std::move(subquery)) {
25 }
26
27 //! The binder used to bind the subquery
28 shared_ptr<Binder> binder;
29 //! The bound subquery node
30 unique_ptr<BoundQueryNode> subquery;
31};
32} // namespace duckdb
33