Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbGetDatabaseUID

Return the database UID, given a session handle and database name.

Declaration

CTDBRET ctdbGetDatabaseUID(CTHANDLE Handle, pTEXT Name, pULONG puid)

Description

ctdbGetDatabaseUID() retrieves the database unique identifier, UID, given the database name. Note that the UID of a database persists as long as that database remains in the session dictionary. Removing a database from a session dictionary and then re-adding it to the session dictionary is very likely to change that database’s UID. Use ctdbGetActiveDatabaseUID() to retrieve the database UID, given the Database Handle. Use ctdbFindDatabaseByUID() to locate a database in a session by its unique identifier.

  • Handle [in] - the session handle.
  • Name [in] - the database name.
  • pUid [out] - the database unique identifier.

Returns

ctdbGetDatabaseUID() returns CTDBRET_OK on success, or c-treeDB API error on failure.

See also

ctdbAllocSession(), ctdbFindDatabaseByUID(), ctdbGetActiveDatabaseUID()

TOCIndex