feat(lsm): implement lsm entry add & remove
This commit is contained in:
parent
115ee12f04
commit
fca8495de4
4 changed files with 105 additions and 2 deletions
|
|
@ -59,6 +59,27 @@ bool lsm_entry_attr_present(lsm_entry *entry, lsm_attr_type type);
|
|||
lsm_error lsm_entry_attr_get(lsm_str **out, lsm_entry *entry,
|
||||
lsm_attr_type type);
|
||||
|
||||
/**
|
||||
* Add a new attribute to the entry.
|
||||
*
|
||||
* @param entry entry to modify
|
||||
* @param type type of attribute to add
|
||||
* @param data data of attribute; ownership of pointer is taken over
|
||||
*/
|
||||
lsm_error lsm_entry_attr_insert(lsm_entry *entry, lsm_attr_type type,
|
||||
lsm_str *data);
|
||||
|
||||
/**
|
||||
* Remove an atribute from the given entry, if present.
|
||||
*
|
||||
* @param out pointer to store removed data pointer in. If NULL, data pointer
|
||||
* can get leaked.
|
||||
* @param entry entry to remove attribute from
|
||||
* @param type type of attribute to remove
|
||||
*/
|
||||
lsm_error lsm_entry_attr_remove(lsm_str **out, lsm_entry *entry,
|
||||
lsm_attr_type type);
|
||||
|
||||
/**
|
||||
* A store consisting of LSM entries.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue