MemTable Class.
More...
#include <memtable.hpp>
|
| void | put (const std::string &key, const std::string &value) |
| | Put a key-value pair into the MemTable.
|
| std::pair< bool, std::string > | get (const std::string &key) |
| | Get the value associated with a key.
|
| void | remove (const std::string &key) |
| | Remove a key from the MemTable.
|
| size_t | getSize () |
| | Get the size of the MemTable.
|
|
Iterator | begin () |
|
Iterator | end () |
|
Iterator | find (const std::string &key) |
MemTable Class.
This class implements a MemTable using a skip list as In-Memory storage for LSM-Tree.
◆ get()
| std::pair< bool, std::string > MemTable::get |
( |
const std::string & | key | ) |
|
|
inline |
Get the value associated with a key.
- Parameters
-
- Returns
- std::pair<bool, std::string> A pair where the first element indicates if the key was found, and the second element is the value associated with the key. If the key was not found, the first element will be false and the second element will be an empty string. If the key was found but marked as TOMBSTONE, the first element will be false and the second element will be TOMBSTONE.
◆ getSize()
| size_t MemTable::getSize |
( |
| ) |
|
|
inline |
◆ put()
| void MemTable::put |
( |
const std::string & | key, |
|
|
const std::string & | value ) |
|
inline |
Put a key-value pair into the MemTable.
- Parameters
-
| key | The key to be inserted. |
| value | The value associated with the key. |
◆ remove()
| void MemTable::remove |
( |
const std::string & | key | ) |
|
|
inline |
Remove a key from the MemTable.
- Parameters
-
| key | The key to be removed. |
The documentation for this class was generated from the following file: