31 lines
451 B
C++
31 lines
451 B
C++
//
|
|
// Created by Kirill Zhukov on 20.04.2025.
|
|
//
|
|
|
|
#ifndef WAL_H
|
|
#define WAL_H
|
|
|
|
#include <fstream>
|
|
|
|
#include "utils/hash/Hash128.h"
|
|
|
|
namespace usub::utils
|
|
{
|
|
class WAL
|
|
{
|
|
std::ofstream out;
|
|
|
|
public:
|
|
explicit WAL(const std::string& filename);
|
|
|
|
void write_put(const Hash128& key, const std::string& value);
|
|
|
|
void write_delete(const Hash128& key);
|
|
|
|
void close();
|
|
};
|
|
} // utils
|
|
// usub
|
|
|
|
#endif //WAL_H
|