1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/planner/expression_binder/constant_binder.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/planner/expression_binder.hpp"
12
13namespace duckdb {
14
15//! The Constant binder can bind ONLY constant foldable expressions (i.e. no subqueries, column refs, etc)
16class ConstantBinder : public ExpressionBinder {
17public:
18 ConstantBinder(Binder &binder, ClientContext &context, string clause);
19
20 //! The location where this binder is used, used for error messages
21 string clause;
22
23protected:
24 BindResult BindExpression(unique_ptr<ParsedExpression> &expr, idx_t depth, bool root_expression = false) override;
25
26 string UnsupportedAggregateMessage() override;
27};
28
29} // namespace duckdb
30