Description.
This method is used to iterate over a set of
Ndb objects, retrieving them one at a time.
Signature.
const Ndb* get_next_ndb_object
(
const Ndb* p
)
Parameters.
This method takes a single parameter, a pointer to the last
Ndb object to have been retrieved or
NULL.
Return Value.
Returns the next Ndb object, or
NULL if no more Ndb
objects are available.
Iterating over Ndb objects.
To retrieve all existing Ndb objects:
Invoke the lock_ndb_objects() method.
This prevents the creation of any new instances of
Ndb until the
unlock_ndb_objects() method is
called.
Retrieve the first available Ndb
object by passing NULL to
get_next_ndb_object(). You can
retrieve the second Ndb object by
passing the pointer retrieved by the first call to the
next get_next_ndb_object() call, and
so on. When a pointer to the last available
Ndb instance is used, the method
returns NULL.
After you have retrieved all desired
Ndb objects, you should re-enable
Ndb object creation by calling the
unlock_ndb_objects() method.
See also
Section 4.24.1.8, “ndb_cluster_connection::lock_ndb_objects()”,
and
Section 4.24.1.9, “ndb_cluster_connection::unlock_ndb_objects()”.
