forked from WesleyBlq/sql_parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ob_delete_stmt.h
45 lines (36 loc) · 1.26 KB
/
ob_delete_stmt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef OCEANBASE_SQL_DELETESTMT_H_
#define OCEANBASE_SQL_DELETESTMT_H_
#include "ob_stmt.h"
#include <string>
//#include "common/ob_string_buf.h"
namespace oceanbase
{
namespace sql
{
class ObDeleteStmt : public ObStmt
{
public:
ObDeleteStmt();
virtual ~ObDeleteStmt();
uint64_t set_delete_table(uint64_t id);
uint64_t get_delete_table_id(void);
void print(FILE* fp, int32_t level, int32_t index);
int64_t make_stmt_string(ResultPlan& result_plan, string &assembled_sql);
int64_t make_exec_plan_unit_string(ResultPlan& result_plan, string where_conditions, vector<schema_shard*> shard_info,string &assembled_sql);
int64_t make_delete_table_string(ResultPlan& result_plan, string &assembled_sql);
int64_t make_delete_where_string(ResultPlan& result_plan, string &assembled_sql);
private:
uint64_t table_id_;
};
inline uint64_t ObDeleteStmt::set_delete_table(uint64_t id)
{
table_id_ = id;
return id;
}
inline uint64_t ObDeleteStmt::get_delete_table_id(void)
{
return table_id_;
}
}
}
#endif //OCEANBASE_SQL_DELETESTMT_H_