kv_iterator_next_key()

#include <kvstore.h>

kv_error_t
kv_iterator_next_key(kv_iterator_t *iterator,
                     const kv_key_t **key) 

Returns the iterator's next key. If another key exists, this function returns KV_SUCCESS, and the key parameter is populated. If there are no more keys, 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

  • store

    The store parameter is the handle to the store to which the iterator belongs.

  • 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.