logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mtbl_iter - iterate over a sequence of key-value pairs

Description

       The mtbl_iter interface is used to return a sequence of one or more key-value pairs. Once the caller
       obtains an mtbl_iter object, mtbl_iter_next() should be repeatedly called on it until there are no more
       key-value entries to retrieve, at which point the iterator object must be freed by calling
       mtbl_iter_destroy(). mtbl_iter_seek() can be called on the iterator to seek to a different location in
       the index without having to destroy the iterator and create a new one.

Name

       mtbl_iter - iterate over a sequence of key-value pairs

Return Value

mtbl_iter_next() returns mtbl_res_success if a key-value entry was successfully retrieved, in which case
       key and val will point to buffers of length len_key and len_val respectively. The value mtbl_res_failure
       is returned if there are no more entries to read, or if the it argument is NULL.

See Also

mtbl_source(3)

                                                   03/29/2019                                       MTBL_ITER(3)

Synopsis

#include<mtbl.h>mtbl_resmtbl_iter_next(structmtbl_iter*it,constuint8_t**key,size_t*len_key,constuint8_t**val,size_t*len_val);voidmtbl_iter_destroy(structmtbl_iter**it);mtbl_resmtbl_iter_seek(structmtbl_iter*it,constuint8_t*key,size_tlen_key);

See Also