feat(lsm): start of on-disk database
This commit is contained in:
parent
eb9157281b
commit
46f89059e4
6 changed files with 199 additions and 23 deletions
|
|
@ -104,10 +104,9 @@ lsm_error lsm_store_init(lsm_store **ptr);
|
|||
* Open the given database file and load it into a new store object.
|
||||
*
|
||||
* @param ptr pointer to store newly allocated store
|
||||
* @param db_path path to the database file
|
||||
* @param data_path path to the data directory
|
||||
*/
|
||||
lsm_error lsm_store_load(lsm_store **ptr, lsm_str *db_path, lsm_str *data_path);
|
||||
lsm_error lsm_store_load(lsm_store **ptr, lsm_str *data_path);
|
||||
|
||||
/**
|
||||
* Dealocate an existing lsm_store object.
|
||||
|
|
@ -193,6 +192,14 @@ lsm_error lsm_entry_data_append_raw(lsm_store *store, lsm_entry_handle *handle,
|
|||
lsm_error lsm_entry_data_read(uint64_t *out, char *buf,
|
||||
lsm_entry_handle *handle, uint64_t len);
|
||||
|
||||
/**
|
||||
* Persist the entry's data to disk.
|
||||
*
|
||||
* @param store store to persist entry in
|
||||
* @param handle handle to entry to persist
|
||||
*/
|
||||
lsm_error lsm_entry_sync(lsm_store *store, lsm_entry_handle *handle);
|
||||
|
||||
/**
|
||||
* Return the length of the entry's data.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue