ctdbGetVTableNumber
ctdbGetVTableNumber() retrieves the number assigned to a virtual table.
Declaration
UINT ctdbGetVTableNumber(CTHANDLE table)
Description
Upon a virtual table open, c-treeDB internally opens the virtual table host and loads the definition of the virtual table from a resource contained in the host table. To identify among multiple possible virtual tables created on a single host table, a definition number is used which is automatically assigned by c-treeDB when defining the virtual table and is stored in the database dictionary.
The dictionary entry for a virtual table contains (in addition to existing table information) links to the host table and the virtual table number.
The resource containing the virtual table information has a resource type set to FC_CTDB_VTABLES (2). Resource numbers range from FCRES_CTDB_VTABLES (0) to FCRES_CTDB_VTABLES_END (199). Its content is as follows (packed, no alignment...)
The remainder of the resource is variable and depends on the virtual table type.
Return Values
ctdbGetVTableNumber() returns the number assigned to a virtual table.
See Also
ctdbAddMRTTable(), ctdbAddVTableResource(), ctdbAllocVTableInfo(), ctdbCreateMRTTable(), ctdbFreeVTableInfo(), ctdbGetVTableInfoFromTable(), ctdbIsVTable(), ctdbRemoveVTableResource(), ctdbSetMRTTableFilter()