MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
|
Abstract class for iterating over key-value pairs in an LSM-Tree. 更多...
#include <ob_lsm_iterator.h>
Public 成员函数 | |
ObLsmIterator (const ObLsmIterator &)=delete | |
ObLsmIterator & | operator= (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.
|
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.
string_view
containing the key of the current entry. 在 oceanbase::ObMemTableIterator, oceanbase::TrxIterator, oceanbase::ObUserIterator, oceanbase::BlockIterator, oceanbase::ObMergingIterator , 以及 oceanbase::TableIterator 内被实现.
|
pure virtual |
Moves the iterator to the next key-value pair in the source.
在 oceanbase::ObMemTableIterator, oceanbase::TrxIterator, oceanbase::ObUserIterator, oceanbase::BlockIterator, oceanbase::ObMergingIterator , 以及 oceanbase::TableIterator 内被实现.
|
pure virtual |
Positions the iterator at the first entry with a key greater than or equal to the specified key.
k | The key to search for. |
在 oceanbase::ObMemTableIterator, oceanbase::TrxIterator, oceanbase::TableIterator, oceanbase::BlockIterator, oceanbase::ObUserIterator , 以及 oceanbase::ObMergingIterator 内被实现.
|
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 内被实现.
|
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 内被实现.
|
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 内被实现.
|
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.
string_view
containing the value of the current entry. 在 oceanbase::ObMemTableIterator, oceanbase::TrxIterator, oceanbase::ObUserIterator, oceanbase::BlockIterator, oceanbase::ObMergingIterator , 以及 oceanbase::TableIterator 内被实现.