/src/duckdb/src/planner/expression_binder/insert_binder.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | #include "duckdb/planner/expression_binder/insert_binder.hpp" |
2 | | |
3 | | #include "duckdb/planner/expression/bound_default_expression.hpp" |
4 | | |
5 | | namespace duckdb { |
6 | | |
7 | 673 | InsertBinder::InsertBinder(Binder &binder, ClientContext &context) : ExpressionBinder(binder, context) { |
8 | 673 | } |
9 | | |
10 | 673 | BindResult InsertBinder::BindExpression(unique_ptr<ParsedExpression> &expr_ptr, idx_t depth, bool root_expression) { |
11 | 673 | auto &expr = *expr_ptr; |
12 | 673 | switch (expr.GetExpressionClass()) { |
13 | 0 | case ExpressionClass::DEFAULT: |
14 | 0 | return BindResult(BinderException::Unsupported(expr, "DEFAULT is not allowed here!")); |
15 | 0 | case ExpressionClass::WINDOW: |
16 | 0 | return BindResult(BinderException::Unsupported(expr, "INSERT statement cannot contain window functions!")); |
17 | 673 | default: |
18 | 673 | return ExpressionBinder::BindExpression(expr_ptr, depth); |
19 | 673 | } |
20 | 673 | } |
21 | | |
22 | 0 | string InsertBinder::UnsupportedAggregateMessage() { |
23 | 0 | return "INSERT statement cannot contain aggregates!"; |
24 | 0 | } |
25 | | |
26 | | } // namespace duckdb |