MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
Public 成员函数 | Private 属性 | 所有成员列表
BplusTreeIndex类 参考

B+树索引 更多...

#include <bplus_tree_index.h>

类 BplusTreeIndex 继承关系图:
Index

Public 成员函数

RC create (const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta)
 
RC open (const char *file_name, const IndexMeta &index_meta, const FieldMeta &field_meta)
 
RC close ()
 
RC insert_entry (const char *record, const RID *rid) override
 插入一条数据 更多...
 
RC delete_entry (const char *record, const RID *rid) override
 删除一条数据 更多...
 
IndexScannercreate_scanner (const char *left_key, int left_len, bool left_inclusive, const char *right_key, int right_len, bool right_inclusive) override
 
RC sync () override
 同步索引数据到磁盘 更多...
 
- Public 成员函数 继承自 Index
const IndexMetaindex_meta () const
 
virtual RC insert_entry (const char *record, const RID *rid)=0
 插入一条数据 更多...
 
virtual RC delete_entry (const char *record, const RID *rid)=0
 删除一条数据 更多...
 
virtual IndexScannercreate_scanner (const char *left_key, int left_len, bool left_inclusive, const char *right_key, int right_len, bool right_inclusive)=0
 创建一个索引数据的扫描器 更多...
 
virtual RC sync ()=0
 同步索引数据到磁盘 更多...
 

Private 属性

bool inited_ = false
 
BplusTreeHandler index_handler_
 

额外继承的成员函数

- Protected 成员函数 继承自 Index
RC init (const IndexMeta &index_meta, const FieldMeta &field_meta)
 
- Protected 属性 继承自 Index
IndexMeta index_meta_
 索引的元数据
 
FieldMeta field_meta_
 当前实现仅考虑一个字段的索引
 

详细描述

B+树索引

成员函数说明

◆ create_scanner()

IndexScanner * BplusTreeIndex::create_scanner ( const char *  left_key,
int  left_len,
bool  left_inclusive,
const char *  right_key,
int  right_len,
bool  right_inclusive 
)
overridevirtual

扫描指定范围的数据

实现了 Index.

◆ delete_entry()

RC BplusTreeIndex::delete_entry ( const char *  record,
const RID rid 
)
overridevirtual

删除一条数据

参数
record删除的记录,当前假设记录是定长的
[in]rid删除的记录的位置

实现了 Index.

◆ insert_entry()

RC BplusTreeIndex::insert_entry ( const char *  record,
const RID rid 
)
overridevirtual

插入一条数据

参数
record插入的记录,当前假设记录是定长的
[out]rid插入的记录的位置

实现了 Index.

◆ sync()

RC BplusTreeIndex::sync ( )
overridevirtual

同步索引数据到磁盘

实现了 Index.


该类的文档由以下文件生成: