| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/planner/operator/logical_reset.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/common/enums/set_scope.hpp" |
| 12 | #include "duckdb/parser/parsed_data/copy_info.hpp" |
| 13 | #include "duckdb/planner/logical_operator.hpp" |
| 14 | #include "duckdb/function/copy_function.hpp" |
| 15 | |
| 16 | namespace duckdb { |
| 17 | |
| 18 | class LogicalReset : public LogicalOperator { |
| 19 | public: |
| 20 | static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_RESET; |
| 21 | |
| 22 | public: |
| 23 | LogicalReset(std::string name_p, SetScope scope_p) |
| 24 | : LogicalOperator(LogicalOperatorType::LOGICAL_RESET), name(name_p), scope(scope_p) { |
| 25 | } |
| 26 | |
| 27 | std::string name; |
| 28 | SetScope scope; |
| 29 | |
| 30 | public: |
| 31 | void Serialize(FieldWriter &writer) const override; |
| 32 | static unique_ptr<LogicalOperator> Deserialize(LogicalDeserializationState &state, FieldReader &reader); |
| 33 | idx_t EstimateCardinality(ClientContext &context) override; |
| 34 | |
| 35 | protected: |
| 36 | void ResolveTypes() override { |
| 37 | types.emplace_back(args: LogicalType::BOOLEAN); |
| 38 | } |
| 39 | }; |
| 40 | |
| 41 | } // namespace duckdb |
| 42 |