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

叶子节点的操作 更多...

#include <bplus_tree.h>

类 LeafIndexNodeHandler 继承关系图:
IndexNodeHandler

Public 成员函数

 LeafIndexNodeHandler (const IndexFileHeader &header, Frame *frame)
 
void init_empty ()
 
void set_next_page (PageNum page_num)
 
PageNum next_page () const
 
char * key_at (int index)
 
char * value_at (int index)
 
int lookup (const KeyComparator &comparator, const char *key, bool *found=nullptr) const
 
void insert (int index, const char *key, const char *value)
 
void remove (int index)
 
int remove (const char *key, const KeyComparator &comparator)
 
RC move_half_to (LeafIndexNodeHandler &other, DiskBufferPool *bp)
 
RC move_first_to_end (LeafIndexNodeHandler &other, DiskBufferPool *disk_buffer_pool)
 
RC move_last_to_front (LeafIndexNodeHandler &other, DiskBufferPool *bp)
 
RC move_to (LeafIndexNodeHandler &other, DiskBufferPool *bp)
 
bool validate (const KeyComparator &comparator, DiskBufferPool *bp) const
 
- Public 成员函数 继承自 IndexNodeHandler
 IndexNodeHandler (const IndexFileHeader &header, Frame *frame)
 
void init_empty (bool leaf)
 
bool is_leaf () const
 
int key_size () const
 
int value_size () const
 
int item_size () const
 
void increase_size (int n)
 
int size () const
 
int max_size () const
 
int min_size () const
 
void set_parent_page_num (PageNum page_num)
 
PageNum parent_page_num () const
 
PageNum page_num () const
 
bool is_safe (BplusTreeOperationType op, bool is_root_node)
 
bool validate () const
 

Private 成员函数

char * __item_at (int index) const
 
char * __key_at (int index) const
 
char * __value_at (int index) const
 
void append (const char *item)
 
void preappend (const char *item)
 

Private 属性

LeafIndexNodeleaf_node_
 

友元

std::string to_string (const LeafIndexNodeHandler &handler, const KeyPrinter &printer)
 

额外继承的成员函数

- Protected 属性 继承自 IndexNodeHandler
const IndexFileHeaderheader_
 
PageNum page_num_
 
IndexNodenode_
 

详细描述

叶子节点的操作

成员函数说明

◆ lookup()

int LeafIndexNodeHandler::lookup ( const KeyComparator comparator,
const char *  key,
bool *  found = nullptr 
) const

查找指定key的插入位置(注意不是key本身) 如果key已经存在,会设置found的值。

◆ move_to()

RC LeafIndexNodeHandler::move_to ( LeafIndexNodeHandler other,
DiskBufferPool bp 
)

move all items to left page


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