taco-db  0.1.0
TableDelete.h
Go to the documentation of this file.
1 #ifndef PLAN_TABLEDELETE_H
2 #define PLAN_TABLEDELETE_H
3 
4 #include "tdb.h"
5 #include "catalog/TableDesc.h"
6 
7 #include "plan/PlanNode.h"
8 #include "expr/ExprNode.h"
9 
10 namespace taco {
11 
12 class TableDeleteState;
13 
21 class TableDelete: public PlanNode {
22 public:
23  static std::unique_ptr<TableDelete>
24  Create(std::shared_ptr<const TableDesc> tabdesc,
25  std::unique_ptr<ExprNode>&& cond);
26 
27  ~TableDelete() 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  TableDelete(std::shared_ptr<const TableDesc> tabdesc,
37  std::unique_ptr<ExprNode>&& cond);
38 
39  std::shared_ptr<const TableDesc> m_tabdesc;
40  std::unique_ptr<ExprNode> m_cond;
41 
42  friend class TableDeleteState;
43 };
44 
45 } // namespace taco
46 
47 #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 deletion action.
Definition: TableDeleteState.h:25
TableDelete is the physical plan for delete actions on a table.
Definition: TableDelete.h:21
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: TableDelete.cpp:30
void node_properties_to_string(std::string &buf, int indent) const override
Definition: TableDelete.cpp:25
std::unique_ptr< ExprNode > m_cond
Definition: TableDelete.h:40
std::shared_ptr< const TableDesc > m_tabdesc
Definition: TableDelete.h:39
~TableDelete() override
Definition: TableDelete.cpp:21
static std::unique_ptr< TableDelete > Create(std::shared_ptr< const TableDesc > tabdesc, std::unique_ptr< ExprNode > &&cond)
Definition: TableDelete.cpp:16
TableDelete(std::shared_ptr< const TableDesc > tabdesc, std::unique_ptr< ExprNode > &&cond)
Definition: TableDelete.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: TableDelete.cpp:41
Definition: datum.h:28