38 void put(
const std::string &key,
const std::string &value) {
39 list->put(key, value);
51 std::pair<bool, std::string>
get(
const std::string &key) {
52 std::pair<bool, std::string> result = list->get(key);
57 return {
false, result.second};
59 return {
true, result.second};
67 void remove(
const std::string &key) {
78 return list->getSize();
89 Iterator find(
const std::string &key) {
90 return list->find(key);
std::pair< bool, std::string > get(const std::string &key)
Get the value associated with a key.
Definition memtable.hpp:51
void put(const std::string &key, const std::string &value)
Put a key-value pair into the MemTable.
Definition memtable.hpp:38
size_t getSize()
Get the size of the MemTable.
Definition memtable.hpp:77
void remove(const std::string &key)
Remove a key from the MemTable.
Definition memtable.hpp:67
A Iterator class for the skip list.
Definition skiplist.hpp:181
Skip List Class.
Definition skiplist.hpp:55
Constants for the database engine.
#define TOMBSTONE
TOMOBSTONE constant.
Definition constants.hpp:22
Skip List Implementation.