taco-db  0.1.0
TableInsert.h
Go to the documentation of this file.
1 #ifndef PLAN_TABLEINSERT_H
2 #define PLAN_TABLEINSERT_H
3 
4 #include "plan/PlanNode.h"
5 #include "catalog/TableDesc.h"
6 
7 namespace taco {
8 
9 class TableInsertState;
10 
22 class TableInsert: public PlanNode {
23 public:
24  static std::unique_ptr<TableInsert>
25  Create(std::unique_ptr<PlanNode>&& child, std::shared_ptr<const TableDesc> tabdesc);
26 
27  ~TableInsert() override;
28 
29  void node_properties_to_string(std::string& buf, int indent) const override;
30 
31  std::unique_ptr<PlanExecState> create_exec_state() const override;
32 
33  const Schema* get_output_schema() const override;
34 
35 private:
36  TableInsert(std::unique_ptr<PlanNode>&& child, std::shared_ptr<const TableDesc> tabdesc);
37 
38  std::shared_ptr<const TableDesc> m_tabdesc;
39 
40  friend class TableInsertState;
41 };
42 
43 } // namespace taco
44 
45 #endif
PlanNode is an abstract interface representing physical query plan that does not bound with any parti...
Definition: PlanNode.h:26
A Schema object stores the information for accessing an ordered set of typed fields either from a dis...
Definition: Schema.h:39
TableDeleteState is the execution state for table insertion action.
Definition: TableInsertState.h:25
TableInsert is the physical plan for insert actions on a table.
Definition: TableInsert.h:22
~TableInsert() override
Definition: TableInsert.cpp:27
std::shared_ptr< const TableDesc > m_tabdesc
Definition: TableInsert.h:38
static std::unique_ptr< TableInsert > Create(std::unique_ptr< PlanNode > &&child, std::shared_ptr< const TableDesc > tabdesc)
Definition: TableInsert.cpp:22
TableInsert(std::unique_ptr< PlanNode > &&child, std::shared_ptr< const TableDesc > tabdesc)
Definition: TableInsert.cpp:10
const Schema * get_output_schema() const override
Each physical plan should link a schema for its output relation, incidating what fields are included ...
Definition: TableInsert.cpp:48
void node_properties_to_string(std::string &buf, int indent) const override
Definition: TableInsert.cpp:31
std::unique_ptr< PlanExecState > create_exec_state() const override
Create the corresponding execution state for the physical plan so that it can be used as physical sca...
Definition: TableInsert.cpp:36
Definition: datum.h:28