27#include "common/lang/string_view.h"
28#include "common/sys/rc.h"
71 virtual string_view
key()
const = 0;
81 virtual string_view
value()
const = 0;
88 virtual void seek(
const string_view &k) = 0;
Abstract class for iterating over key-value pairs in an LSM-Tree.
Definition: ob_lsm_iterator.h:41
virtual void seek_to_first()=0
Positions the iterator at the first 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 void seek_to_last()=0
Positions the iterator at the last key-value pair in the source.
virtual void next()=0
Moves the iterator to the next key-value pair in the source.
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 string_view value() const =0
Returns the value of the current entry the iterator is positioned at.
virtual bool valid() const =0
Checks if the iterator is currently positioned at a valid key-value pair.