An iterator for traversing the contents of an ObMemTable
.
更多...
#include <ob_memtable.h>
|
| ObMemTableIterator (shared_ptr< ObMemTable > mem, ObMemTable::Table *table) |
|
| ObMemTableIterator (const ObMemTableIterator &)=delete |
|
ObMemTableIterator & | operator= (const ObMemTableIterator &)=delete |
|
void | seek (const string_view &k) override |
| Positions the iterator at the first entry with a key greater than or equal to the specified key. 更多...
|
|
void | seek_to_first () override |
| Positions the iterator at the first key-value pair in the source. 更多...
|
|
void | seek_to_last () override |
| Positions the iterator at the last key-value pair in the source. 更多...
|
|
bool | valid () const override |
| Checks if the iterator is currently positioned at a valid key-value pair. 更多...
|
|
void | next () override |
| Moves the iterator to the next key-value pair in the source. 更多...
|
|
string_view | key () const override |
| Returns the key of the current entry the iterator is positioned at. 更多...
|
|
string_view | value () const override |
| Returns the value of the current entry the iterator is positioned at. 更多...
|
|
| 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. 更多...
|
|
|
shared_ptr< ObMemTable > | mem_ |
|
ObMemTable::Table::Iterator | iter_ |
|
string | tmp_ |
|
An iterator for traversing the contents of an ObMemTable
.
◆ key()
string_view oceanbase::ObMemTableIterator::key |
( |
| ) |
const |
|
overridevirtual |
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::ObLsmIterator.
◆ next()
void oceanbase::ObMemTableIterator::next |
( |
| ) |
|
|
inlineoverridevirtual |
◆ seek()
void oceanbase::ObMemTableIterator::seek |
( |
const string_view & |
k | ) |
|
|
overridevirtual |
Positions the iterator at the first entry with a key greater than or equal to the specified key.
- 参数
-
实现了 oceanbase::ObLsmIterator.
◆ seek_to_first()
void oceanbase::ObMemTableIterator::seek_to_first |
( |
| ) |
|
|
inlineoverridevirtual |
◆ seek_to_last()
void oceanbase::ObMemTableIterator::seek_to_last |
( |
| ) |
|
|
inlineoverridevirtual |
◆ valid()
bool oceanbase::ObMemTableIterator::valid |
( |
| ) |
const |
|
inlineoverridevirtual |
Checks if the iterator is currently positioned at a valid key-value pair.
- 返回
true
if the iterator is valid, false
otherwise.
实现了 oceanbase::ObLsmIterator.
◆ value()
string_view oceanbase::ObMemTableIterator::value |
( |
| ) |
const |
|
overridevirtual |
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::ObLsmIterator.
该类的文档由以下文件生成:
- src/oblsm/memtable/ob_memtable.h
- src/oblsm/memtable/ob_memtable.cpp