taco-db  0.1.0
TableDeleteState.h
Go to the documentation of this file.
1 #ifndef EXECUTION_TABLEDELETESTATE_H
2 #define EXECUTION_TABLEDELETESTATE_H
3 
5 #include "plan/TableDelete.h"
6 #include "index/Index.h"
7 
8 namespace taco {
9 
26 public:
27  ~TableDeleteState() override;
28 
29  void node_properties_to_string(std::string& buf, int indent) const override;
30 
31  void init() override;
32 
33  bool next_tuple() override;
34 
35  std::vector<NullableDatumRef> get_record() override;
36 
37  void close() override;
38 
39  void rewind() override;
40 
41  const PlanNode*
42  get_plan() const {
43  return m_plan;
44  }
45 
46 private:
47  TableDeleteState(const TableDelete* plan,
48  std::unique_ptr<Table>&& table,
49  std::vector<std::unique_ptr<Index>>&& idxs);
50 
52 
53  std::unique_ptr<Table> m_table;
54  std::vector<std::unique_ptr<Index>> m_idxs;
55  int64_t m_res;
56 
57  friend class TableDelete;
58 };
59 
60 } // namespace taco
61 
62 #endif
Index.h
taco::TableDeleteState::m_plan
const TableDelete * m_plan
Definition: TableDeleteState.h:51
taco::TableDeleteState::m_idxs
std::vector< std::unique_ptr< Index > > m_idxs
Definition: TableDeleteState.h:54
taco::TableDeleteState::node_properties_to_string
void node_properties_to_string(std::string &buf, int indent) const override
Definition: TableDeleteState.cpp:23
taco
Definition: datum.h:28
taco::TableDeleteState::TableDeleteState
TableDeleteState(const TableDelete *plan, std::unique_ptr< Table > &&table, std::vector< std::unique_ptr< Index >> &&idxs)
Definition: TableDeleteState.cpp:7
taco::TableDeleteState::init
void init() override
Initialize this plan execution state, set m_initialized to true and initialize all corresponding stat...
Definition: TableDeleteState.cpp:28
taco::TableDeleteState::rewind
void rewind() override
Rewind the execution state as if it has just been initialized.
Definition: TableDeleteState.cpp:77
taco::TableDelete
TableDelete is the physical plan for delete actions on a table.
Definition: TableDelete.h:21
taco::TableDeleteState::get_record
std::vector< NullableDatumRef > get_record() override
Return the deserialized output record to which this execution state currently points.
Definition: TableDeleteState.cpp:66
taco::TableDeleteState::next_tuple
bool next_tuple() override
Moves the iterator of this execution state to the next output record.
Definition: TableDeleteState.cpp:35
taco::TableDeleteState::get_plan
const PlanNode * get_plan() const
Returns the corresponding plan.
Definition: TableDeleteState.h:42
taco::TableDeleteState
TableDeleteState is the execution state for table deletion action.
Definition: TableDeleteState.h:25
taco::PlanExecState
PlanExecState is an abstract interface for execution state of various query plan.
Definition: PlanExecState.h:19
taco::TableDeleteState::m_table
std::unique_ptr< Table > m_table
Definition: TableDeleteState.h:53
taco::TableDeleteState::close
void close() override
Clear internal states, mark we have finish retrieving output records from this execution state,...
Definition: TableDeleteState.cpp:71
taco::TableDeleteState::m_res
int64_t m_res
Definition: TableDeleteState.h:55
PlanExecState.h
TableDelete.h
taco::PlanNode
PlanNode is an abstract interface representing physical query plan that does not bound with any parti...
Definition: PlanNode.h:26
taco::TableDeleteState::~TableDeleteState
~TableDeleteState() override
Definition: TableDeleteState.cpp:16