kv_iterator_next()

#include <kvstore.h>

kv_error_t 
kv_iterator_next(kv_iterator_t *iterator,
                 const kv_key_t **key,
                 const kv_value_t **value) 

Returns the iterator's next record. If another record exists, this function returns KV_SUCCESS, and the keyand value parameters are populated. If there are no more records, the return value is KV_NO_SUCH_OBJECT. If the return value is something other than KV_SUCCESS or KV_NO_SUCH_OBJECT, there was an operational failure.

Parameters

  • iterator

    The iterator parameter is the handle to the iterator. It is allocated using one of functions that performs multiple reads of the store (such as kv_multi_get()). It is released using kv_release_iterator().

  • key

    The key parameter references memory in which a pointer to the next key is copied.

    Note, you should not release this key structure. The resources used here will be released when the iterator is released.

  • value

    The value parameter references memory in which a pointer to the next value is copied.

    Note, you should not release this value structure. The resources used here will be released when the iterator is released.