feat(lsm): possibly added reading db file on load

This commit is contained in:
Jef Roosens 2023-11-07 23:00:22 +01:00
parent 46f89059e4
commit 38e9496717
Signed by: Jef Roosens
GPG key ID: 02D4C0997E74717B
4 changed files with 138 additions and 11 deletions

View file

@ -10,13 +10,17 @@ int main() {
lsm_str_init_copy(&data_dir, "data");
lsm_store *store;
lsm_store_load(&store, data_dir);
assert(lsm_store_load(&store, data_dir) == lsm_error_ok);
lsm_str *key;
lsm_str_init_copy(&key, "key");
lsm_entry_handle *handle;
assert(lsm_store_insert(&handle, store, key) == lsm_error_ok);
lsm_str *attr;
lsm_str_init_copy(&attr, "some attribute value");
lsm_entry_attr_insert(handle, lsm_attr_type_content_type, attr);
lsm_str *data;
lsm_str_init_copy(&data, "hello");