1 | //===----------------------------------------------------------------------===// |
---|---|
2 | // DuckDB |
3 | // |
4 | // duckdb/main/relation/update_relation.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/main/relation.hpp" |
12 | #include "duckdb/parser/parsed_expression.hpp" |
13 | |
14 | namespace duckdb { |
15 | |
16 | class UpdateRelation : public Relation { |
17 | public: |
18 | UpdateRelation(ClientContextWrapper &context, unique_ptr<ParsedExpression> condition, string schema_name, |
19 | string table_name, vector<string> update_columns, vector<unique_ptr<ParsedExpression>> expressions); |
20 | |
21 | vector<ColumnDefinition> columns; |
22 | unique_ptr<ParsedExpression> condition; |
23 | string schema_name; |
24 | string table_name; |
25 | vector<string> update_columns; |
26 | vector<unique_ptr<ParsedExpression>> expressions; |
27 | |
28 | public: |
29 | BoundStatement Bind(Binder &binder) override; |
30 | const vector<ColumnDefinition> &Columns() override; |
31 | string ToString(idx_t depth) override; |
32 | bool IsReadOnly() override { |
33 | return false; |
34 | } |
35 | }; |
36 | |
37 | } // namespace duckdb |
38 |