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

Abstract class for iterating over key-value pairs in an LSM-Tree. 更多...

#include <ob_lsm_iterator.h>

类 oceanbase::ObLsmIterator 继承关系图:
oceanbase::BlockIterator oceanbase::ObMemTableIterator oceanbase::ObMergingIterator oceanbase::ObUserIterator oceanbase::TableIterator oceanbase::TrxInnerMapIterator oceanbase::TrxIterator

Public 成员函数

 ObLsmIterator (const ObLsmIterator &)=delete
 
ObLsmIteratoroperator= (const ObLsmIterator &)=delete
 
virtual bool valid () const =0
 Checks if the iterator is currently positioned at a valid key-value pair. 更多...
 
virtual void next ()=0
 Moves the iterator to the next key-value pair in the source. 更多...
 
virtual string_view key () const =0
 Returns the key of the current entry the iterator is positioned at. 更多...
 
virtual string_view value () const =0
 Returns the value of the current entry the iterator is positioned at. 更多...
 
virtual void seek (const string_view &k)=0
 Positions the iterator at the first entry with a key greater than or equal to the specified key. 更多...
 
virtual void seek_to_first ()=0
 Positions the iterator at the first key-value pair in the source. 更多...
 
virtual void seek_to_last ()=0
 Positions the iterator at the last key-value pair in the source. 更多...
 

详细描述

Abstract class for iterating over key-value pairs in an LSM-Tree.

This class provides an interface for iterators used to traverse key-value entries stored in an LSM-Tree. Derived classes must implement this interface to handle specific storage structures, such as SSTables or MemTables.

成员函数说明

◆ key()

virtual string_view oceanbase::ObLsmIterator::key ( ) const
pure virtual

Returns the key of the current entry the iterator is positioned at.

This method retrieves the key corresponding to the key-value pair at the current position of the iterator.

返回
A string_view containing the key of the current entry.

oceanbase::ObMemTableIterator, oceanbase::TrxIterator, oceanbase::ObUserIterator, oceanbase::BlockIterator, oceanbase::ObMergingIterator , 以及 oceanbase::TableIterator 内被实现.

◆ next()

virtual void oceanbase::ObLsmIterator::next ( )
pure virtual

◆ seek()

virtual void oceanbase::ObLsmIterator::seek ( const string_view &  k)
pure virtual

Positions the iterator at the first entry with a key greater than or equal to the specified key.

参数
kThe key to search for.

oceanbase::ObMemTableIterator, oceanbase::TrxIterator, oceanbase::TableIterator, oceanbase::BlockIterator, oceanbase::ObUserIterator , 以及 oceanbase::ObMergingIterator 内被实现.

◆ seek_to_first()

virtual void oceanbase::ObLsmIterator::seek_to_first ( )
pure virtual

Positions the iterator at the first key-value pair in the source.

oceanbase::ObMemTableIterator, oceanbase::TrxIterator, oceanbase::ObUserIterator, oceanbase::BlockIterator, oceanbase::ObMergingIterator , 以及 oceanbase::TableIterator 内被实现.

◆ seek_to_last()

virtual void oceanbase::ObLsmIterator::seek_to_last ( )
pure virtual

Positions the iterator at the last key-value pair in the source.

oceanbase::ObMemTableIterator, oceanbase::TrxIterator, oceanbase::ObUserIterator, oceanbase::BlockIterator, oceanbase::ObMergingIterator , 以及 oceanbase::TableIterator 内被实现.

◆ valid()

virtual bool oceanbase::ObLsmIterator::valid ( ) const
pure virtual

Checks if the iterator is currently positioned at a valid key-value pair.

返回
true if the iterator is valid, false otherwise.

oceanbase::ObMemTableIterator, oceanbase::TrxIterator, oceanbase::ObUserIterator, oceanbase::BlockIterator, oceanbase::ObMergingIterator , 以及 oceanbase::TableIterator 内被实现.

◆ value()

virtual string_view oceanbase::ObLsmIterator::value ( ) const
pure virtual

Returns the value of the current entry the iterator is positioned at.

This method retrieves the value corresponding to the key-value pair at the current position of the iterator.

返回
A string_view containing the value of the current entry.

oceanbase::ObMemTableIterator, oceanbase::TrxIterator, oceanbase::ObUserIterator, oceanbase::BlockIterator, oceanbase::ObMergingIterator , 以及 oceanbase::TableIterator 内被实现.


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