Data structures and functions for iterating over objects.
◆ JObjectIterator
◆ j_object_iterator_free()
◆ j_object_iterator_get()
Returns the current collection.
- Parameters
-
iterator | A store iterator. |
- Returns
- A new collection. Should be freed with j_object_unref().
◆ j_object_iterator_new()
JObjectIterator * j_object_iterator_new |
( |
gchar const * |
namespace, |
|
|
gchar const * |
prefix |
|
) |
| |
Creates a new JObjectIterator.
- Parameters
-
namespace | The namespace to iterate over. |
prefix | Prefix of names to iterate over. Set to NULL to iterate over all objects in the namespace. |
- Returns
- A new JObjectIterator.
- Todo:
- j_backend_object_get_all(iterator->object_backend, namespace, &(iterator->cursor));
- Todo:
- j_backend_object_get_by_prefix(iterator->object_backend, namespace, prefix, &(iterator->cursor));
◆ j_object_iterator_new_for_index()
JObjectIterator * j_object_iterator_new_for_index |
( |
guint32 |
index, |
|
|
gchar const * |
namespace, |
|
|
gchar const * |
prefix |
|
) |
| |
Creates a new JObjectIterator on a specific object server.
- Parameters
-
index | Server to query. |
namespace | JKV namespace to iterate over. |
prefix | Prefix of names to iterate over. Set to NULL to iterate over all objects in the namespace. |
- Returns
- A new JObjectIterator.
- Todo:
- still necessary?
- Todo:
- j_backend_object_get_all(iterator->object_backend, namespace, &(iterator->cursor));
- Todo:
- j_backend_object_get_by_prefix(iterator->object_backend, namespace, prefix, &(iterator->cursor));
◆ j_object_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.
- Todo:
- ret = j_backend_object_iterate(iterator->object_backend, iterator->cursor, &(iterator->key), &(iterator->value), &(iterator->len));