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

Represents a data block in the LSM-Tree. 更多...

#include <ob_block.h>

Public 成员函数

 ObBlock (const ObComparator *comparator)
 
void add_offset (uint32_t offset)
 
uint32_t get_offset (int index) const
 
string_view get_entry (uint32_t offset) const
 
int size () const
 
RC decode (const string &data)
 Decodes serialized block data. 更多...
 
ObLsmIteratornew_iterator () const
 

Private 属性

string data_
 
vector< uint32_t > offsets_
 
const ObComparatorcomparator_
 

详细描述

Represents a data block in the LSM-Tree.

The ObBlock class manages a block of serialized key-value pairs, along with their offsets, for efficient storage and retrieval. It provides methods to decode serialized data, access individual entries, and create iterators for traversing the block contents.

成员函数说明

◆ decode()

RC oceanbase::ObBlock::decode ( const string &  data)

Decodes serialized block data.

This function parses and decodes the serialized string data to reconstruct the block's structure, including all key-value offsets and entries. The decoded data format can reference ObBlockBuilder.

参数
dataThe serialized block data as a string.
返回
RC The result code indicating the success or failure of the decode operation.

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