Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbGetVTableNumber

ctdbGetVTableNumber() retrieves the number assigned to a virtual table.

Declaration

UINT ctdbGetVTableNumber(CTHANDLE table)

Description

  • table: A handle to any FairCom DB API table.

Upon a virtual table open, FairCom DB API 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 FairCom DB API 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...)

  • First byte: endian-ness
  • Next 4 bytes: virtual table type

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()

TOCIndex