1 | //===----------------------------------------------------------------------===// |
---|---|
2 | // DuckDB |
3 | // |
4 | // duckdb/planner/operator/logical_execute.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/main/prepared_statement_data.hpp" |
12 | #include "duckdb/planner/logical_operator.hpp" |
13 | |
14 | namespace duckdb { |
15 | |
16 | class LogicalExecute : public LogicalOperator { |
17 | public: |
18 | static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_EXECUTE; |
19 | |
20 | public: |
21 | explicit LogicalExecute(shared_ptr<PreparedStatementData> prepared_p) |
22 | : LogicalOperator(LogicalOperatorType::LOGICAL_EXECUTE), prepared(std::move(prepared_p)) { |
23 | D_ASSERT(prepared); |
24 | types = prepared->types; |
25 | } |
26 | |
27 | shared_ptr<PreparedStatementData> prepared; |
28 | |
29 | public: |
30 | void Serialize(FieldWriter &writer) const override; |
31 | static unique_ptr<LogicalOperator> Deserialize(LogicalDeserializationState &state, FieldReader &reader); |
32 | //! Skips the serialization check in VerifyPlan |
33 | bool SupportSerialization() const override { |
34 | return false; |
35 | } |
36 | |
37 | protected: |
38 | void ResolveTypes() override { |
39 | // already resolved |
40 | } |
41 | vector<ColumnBinding> GetColumnBindings() override { |
42 | return GenerateColumnBindings(table_idx: 0, column_count: types.size()); |
43 | } |
44 | }; |
45 | } // namespace duckdb |
46 |