MiniOB
1
MiniOB is one mini database, helping developers to learn how database works.
Toggle main menu visibility
首页
模块
类
类列表
类索引
类继承关系
类成员
全部
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
函数
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
变量
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
枚举
枚举值
文件
文件列表
文件成员
全部
函数
枚举
宏定义
•
全部
类
文件
函数
变量
枚举
枚举值
宏定义
组
页
载入中...
搜索中...
未找到
src
observer
sql
stmt
insert_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
class
Db
;
22
27
class
InsertStmt
:
public
Stmt
28
{
29
public
:
30
InsertStmt
() =
default
;
31
InsertStmt
(
Table
*table,
const
Value
*values,
int
value_amount);
32
33
StmtType type()
const override
34
{
35
return
StmtType::INSERT;
36
}
37
38
public
:
39
static
RC create(
Db
*db,
const
InsertSqlNode
&insert_sql,
Stmt
*&stmt);
40
41
public
:
42
Table
*table()
const
43
{
44
return
table_;
45
}
46
const
Value
*values()
const
47
{
48
return
values_;
49
}
50
int
value_amount()
const
51
{
52
return
value_amount_;
53
}
54
55
private
:
56
Table
*table_ =
nullptr
;
57
const
Value
*values_ =
nullptr
;
58
int
value_amount_ = 0;
59
};
Db
一个DB实例负责管理一批表
Definition:
db.h:34
InsertStmt
插入语句
Definition:
insert_stmt.h:28
Stmt
Stmt for Statement
Definition:
stmt.h:78
Table
表
Definition:
table.h:37
Value
属性的值
Definition:
value.h:40
stmt.h
InsertSqlNode
描述一个insert语句
Definition:
parse_defs.h:114
制作者
1.9.5