refactor(lsm): switch to uint8_t attr types; refactor disk code
This commit is contained in:
parent
b5fc3a3612
commit
35c301955f
6 changed files with 84 additions and 96 deletions
|
|
@ -21,7 +21,7 @@ typedef struct lsm_entry_handle lsm_entry_handle;
|
|||
* @param entry entry to check
|
||||
* @param type type of attribute to check for
|
||||
*/
|
||||
bool lsm_entry_attr_present(lsm_entry_handle *handle, uint64_t type);
|
||||
bool lsm_entry_attr_present(lsm_entry_handle *handle, uint8_t type);
|
||||
|
||||
/**
|
||||
* Retrieve the contents of an attribute from an entry, if present
|
||||
|
|
@ -31,7 +31,7 @@ bool lsm_entry_attr_present(lsm_entry_handle *handle, uint64_t type);
|
|||
* @param type type of attribute to return
|
||||
*/
|
||||
lsm_error lsm_entry_attr_get(lsm_str **out, lsm_entry_handle *handle,
|
||||
uint64_t type);
|
||||
uint8_t type);
|
||||
|
||||
/**
|
||||
* Convenience wrapper around `lsm_entry_attr_get` that can be used if we know
|
||||
|
|
@ -42,7 +42,7 @@ lsm_error lsm_entry_attr_get(lsm_str **out, lsm_entry_handle *handle,
|
|||
* @param type type of attribute to return
|
||||
*/
|
||||
lsm_error lsm_entry_attr_get_num(uint64_t *out, lsm_entry_handle *handle,
|
||||
uint64_t type);
|
||||
uint8_t type);
|
||||
|
||||
/**
|
||||
* Add a new attribute to the entry.
|
||||
|
|
@ -51,7 +51,7 @@ lsm_error lsm_entry_attr_get_num(uint64_t *out, lsm_entry_handle *handle,
|
|||
* @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_handle *handle, uint64_t type,
|
||||
lsm_error lsm_entry_attr_insert(lsm_entry_handle *handle, uint8_t type,
|
||||
lsm_str *data);
|
||||
|
||||
/**
|
||||
|
|
@ -62,7 +62,7 @@ lsm_error lsm_entry_attr_insert(lsm_entry_handle *handle, uint64_t type,
|
|||
* @param type type of attribute to add
|
||||
* @param data data of attribute
|
||||
*/
|
||||
lsm_error lsm_entry_attr_insert_num(lsm_entry_handle *handle, uint64_t type,
|
||||
lsm_error lsm_entry_attr_insert_num(lsm_entry_handle *handle, uint8_t type,
|
||||
uint64_t data);
|
||||
|
||||
/**
|
||||
|
|
@ -74,7 +74,7 @@ lsm_error lsm_entry_attr_insert_num(lsm_entry_handle *handle, uint64_t type,
|
|||
* @param type type of attribute to remove
|
||||
*/
|
||||
lsm_error lsm_entry_attr_remove(lsm_str **out, lsm_entry_handle *handle,
|
||||
uint64_t type);
|
||||
uint8_t type);
|
||||
|
||||
/**
|
||||
* A store consisting of LSM entries.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue