Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbSetTableDictionaryMark

Set the table dictionary mark.

Declaration

CTDBRET ctdbDECL ctdbSetTableDictionaryMark(CTHANDLE Handle, UCOUNT mark)

Description

  • Handle [IN] - Table handle
  • mark [IN] - Table dictionary mark

Returns

CTDBRET_OK on success or c-tree error code on failure.

Table Marks

In V12 and later, a new concept has been implemented in FairCom DB API that makes it faster and easier to find specific files in applications with a large quantity of files: table marks. A table mark is a mark (or flag) associated with the table when it is added to a database (so it's a mark in the database dictionary). We currently support up to 16 different marks on each table. These marks can be used to "brand" the table with some meaning.

At this time, the only table mark implemented is _DICT_VERMARK_TBL_APP_LIST, which signifies that the table is branded so as to simulate the effect of the APP_NAME_LIST keyword, but instead of being listed in ctsrvr.cfg it is marked in the database dictionary.

The ctdbAddTableXtd() function has been modified so that the first parameter, Handle (previously interpreted as a database handle), can now be a table handle. If it is a table handle, the database handle is derived from it, and the dictionary mark setting in the table handle is used when adding the table to the dictionary.

New API functions have been created to support this feature:

ctdbFindTableDictionaryMark() (ctdbFindTableDictionaryMark, ctdbFindTableDictionaryMark)

ctdbSetDatabaseTableMarkFilter() (ctdbSetDatabaseTableMarkFilter, ctdbSetDatabaseTableMarkFilter)

ctdbSetTableDictionaryMark() (ctdbSetTableDictionaryMark, ctdbSetTableDictionaryMark)

TOCIndex