1 | //===----------------------------------------------------------------------===// |
2 | // DuckDB |
3 | // |
4 | // duckdb/execution/operator/persistent/physical_update.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/execution/physical_operator.hpp" |
12 | |
13 | namespace duckdb { |
14 | class DataTable; |
15 | |
16 | //! Physically update data in a table |
17 | class PhysicalUpdate : public PhysicalOperator { |
18 | public: |
19 | PhysicalUpdate(LogicalOperator &op, TableCatalogEntry &tableref, DataTable &table, vector<column_t> columns, |
20 | vector<unique_ptr<Expression>> expressions, vector<unique_ptr<Expression>> bound_defaults) |
21 | : PhysicalOperator(PhysicalOperatorType::UPDATE, op.types), tableref(tableref), table(table), columns(columns), |
22 | expressions(move(expressions)), bound_defaults(move(bound_defaults)) { |
23 | } |
24 | |
25 | TableCatalogEntry &tableref; |
26 | DataTable &table; |
27 | vector<column_t> columns; |
28 | vector<unique_ptr<Expression>> expressions; |
29 | vector<unique_ptr<Expression>> bound_defaults; |
30 | bool is_index_update; |
31 | |
32 | public: |
33 | void GetChunkInternal(ClientContext &context, DataChunk &chunk, PhysicalOperatorState *state) override; |
34 | }; |
35 | |
36 | } // namespace duckdb |
37 | |