ctdbNextDatabase
Get the name and path of the next database in this session dictionary.
Declaration
CTDBRET ctdbNextDatabase(CTHANDLE Handle, pTEXT Name, VRLEN NameSize,
pTEXT Path, VRLEN PathSize)
Description
ctdbNextDatabase() gets the name and path of the next database in this session dictionary.
Use ctdbNextDatabase() with ctdbFirstDatabase() to obtain the names and paths of all the databases that are in this session dictionary. Use ctdbGetDatabaseCount() to retrieve the total number of databases in the session dictionary.
Returns
ctdbNextDatabase() returns CTDBRET_OK on success, or INOT_ERR (101) after the last database in the session dictionary has been retrieved, or a c-tree error code on failure.
Example
ctdbFirstDatabase(hSession, name, sizeof(name), path, sizeof(path));
do {
printf("\n\nDatabase: %s (%s)\n", path, name);
}
while (
ctdbNextDatabase(hSession, name, sizeof(name), path, sizeof(path))
== CTDBRET_OK );
See also
ctdbFirstDatabase(), ctdbFindDatabase(), ctdbGetDatabaseCount()