17#ifndef WISCKEY_VALUE_LOG_H
18#define WISCKEY_VALUE_LOG_H
Value Log of the Database.
Definition value_log.h:44
size_t tail
Definition value_log.h:48
FILE * file
The file that the values are written to.
Definition value_log.h:45
size_t head
Definition value_log.h:46
int ValueLog_append(struct ValueLog *log, size_t *pos, const char *key, size_t key_len, const char *value, size_t value_len)
Appends a new key-value pair to the ValueLog.
Definition value_log.c:48
int ValueLog_sync(const struct ValueLog *log)
Syncs the ValueLog to the disk.
Definition value_log.c:135
struct ValueLog * ValueLog_new(const char *path, size_t head, size_t tail)
Creates a new ValueLog or loads an existing one from disk.
Definition value_log.c:25
void ValueLog_free(struct ValueLog *log)
Frees the ValueLog.
Definition value_log.c:152
int ValueLog_get(const struct ValueLog *log, char **value, size_t *value_len, size_t value_loc)
Fetches a value from the ValueLog at a given position.
Definition value_log.c:92