MiniOB
1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
src
observer
sql
stmt
update_stmt.h
1
/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved.
2
miniob is licensed under Mulan PSL v2.
3
You can use this software according to the terms and conditions of the Mulan PSL v2.
4
You may obtain a copy of Mulan PSL v2 at:
5
http://license.coscl.org.cn/MulanPSL2
6
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
7
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
8
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
9
See the Mulan PSL v2 for more details. */
10
11
//
12
// Created by Wangyunlai on 2022/5/22.
13
//
14
15
#pragma once
16
17
#include "common/rc.h"
18
#include "
sql/stmt/stmt.h
"
19
20
class
Table
;
21
26
class
UpdateStmt
:
public
Stmt
27
{
28
public
:
29
UpdateStmt
() =
default
;
30
UpdateStmt
(
Table
*table,
Value
*values,
int
value_amount);
31
32
public
:
33
static
RC create(
Db
*db,
const
UpdateSqlNode
&update_sql,
Stmt
*&stmt);
34
35
public
:
36
Table
*table()
const
37
{
38
return
table_;
39
}
40
Value
*values()
const
41
{
42
return
values_;
43
}
44
int
value_amount()
const
45
{
46
return
value_amount_;
47
}
48
49
private
:
50
Table
*table_ =
nullptr
;
51
Value
*values_ =
nullptr
;
52
int
value_amount_ = 0;
53
};
Db
一个DB实例负责管理一批表
Definition:
db.h:34
Stmt
Stmt for Statement
Definition:
stmt.h:78
Table
表
Definition:
table.h:37
UpdateStmt
更新语句
Definition:
update_stmt.h:27
Value
属性的值
Definition:
value.h:40
stmt.h
UpdateSqlNode
描述一个update语句
Definition:
parse_defs.h:134
制作者
1.9.5