1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/planner/expression_binder/where_binder.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/planner/expression_binder.hpp"
12
13namespace duckdb {
14
15class ColumnAliasBinder;
16
17//! The WHERE binder is responsible for binding an expression within the WHERE clause of a SQL statement
18class WhereBinder : public ExpressionBinder {
19public:
20 WhereBinder(Binder &binder, ClientContext &context, optional_ptr<ColumnAliasBinder> column_alias_binder = nullptr);
21
22protected:
23 BindResult BindExpression(unique_ptr<ParsedExpression> &expr_ptr, idx_t depth,
24 bool root_expression = false) override;
25
26 string UnsupportedAggregateMessage() override;
27
28private:
29 BindResult BindColumnRef(unique_ptr<ParsedExpression> &expr_ptr, idx_t depth, bool root_expression);
30
31 optional_ptr<ColumnAliasBinder> column_alias_binder;
32};
33
34} // namespace duckdb
35