| 1 | #include "duckdb/parser/statement/select_statement.hpp" |
|---|---|
| 2 | #include "duckdb/planner/binder.hpp" |
| 3 | #include "duckdb/planner/bound_query_node.hpp" |
| 4 | |
| 5 | using namespace duckdb; |
| 6 | using namespace std; |
| 7 | |
| 8 | BoundStatement Binder::Bind(SelectStatement &stmt) { |
| 9 | // first we visit the set of CTEs and add them to the bind context |
| 10 | for (auto &cte_it : stmt.cte_map) { |
| 11 | AddCTE(cte_it.first, cte_it.second.get()); |
| 12 | } |
| 13 | // now visit the root node of the select statement |
| 14 | return Bind(*stmt.node); |
| 15 | } |
| 16 |