Data structures and functions for iterating over key-value pairs.
◆ JKVIterator
◆ j_kv_iterator_free()
Frees the memory allocated by the JKVIterator.
- Parameters
-
◆ j_kv_iterator_get()
gchar const* j_kv_iterator_get |
( |
JKVIterator * |
iterator, |
|
|
gconstpointer * |
value, |
|
|
guint32 * |
len |
|
) |
| |
Returns the current collection.
- Parameters
-
iterator | A store iterator. |
value | A pointer to be set to the current value. |
len | Will be set to the length of the current value. |
- Returns
- The current key.
◆ j_kv_iterator_new()
G_END_DECLS G_BEGIN_DECLS JKVIterator* j_kv_iterator_new |
( |
gchar const * |
namespace, |
|
|
gchar const * |
prefix |
|
) |
| |
Creates a new JKVIterator.
- Parameters
-
namespace | JKV namespace to iterate over. |
prefix | Prefix of keys to iterate over. Set to NULL to iterate over all KVs. |
- Returns
- A new JKVIterator.
- Todo:
- still necessary?
◆ j_kv_iterator_new_for_index()
JKVIterator* j_kv_iterator_new_for_index |
( |
guint32 |
index, |
|
|
gchar const * |
namespace, |
|
|
gchar const * |
prefix |
|
) |
| |
Creates a new JKVIterator on a specific KV server.
- Parameters
-
index | Server to query. |
namespace | JKV namespace to iterate over. |
prefix | Prefix of keys to iterate over. Set to NULL to iterate over all KVs. |
- Returns
- A new JKVIterator.
- Todo:
- still necessary?
◆ j_kv_iterator_next()
Checks whether another collection is available.
- Parameters
-
iterator | A store iterator. |
- Returns
- TRUE on success, FALSE if the end of the store is reached.