Product Documentation

V9 Update Guide

Previous Topic

Next Topic

Row Level Permanent Filters

Unlike the standard call to ctdbFilterRecord() to establish a temporary, user specific filter for data record reads, a new type of permanent filter can be established that is system-wide (i.e., once established the filter applies to all users).

This powerful capability will enable c-treeDB users to implement advanced customizations just before reading and/or writing records, such as customized record read and/or record write constraints or row level security. Refer to the FairCom DB section Row-Level Permanent Callback Filters for complete details regarding the callback implementations.

FairCom DB callbacks

After establishing the system-wide filter, you must add your custom code to the following callback functions in module ctclbk.c:

  • ctfiltercb_init() - called every time a new filter is established or when a table with a permanent system-wide filter is opened.
  • ctfiltercb_uninit() - called every time a new filter is deleted, or when a table with a permanent system-wide filter is closed.
  • ctfiltercb_rowl() - called every time a record is added or updated, or when an existing record is read, depending on the mode passed to the ctdbSystemFilterOn() function.

c-treeDB C API Methods

  • ctdbSystemFilterOn() - Establish a row level filter for a table.
  • ctdbSystemFilterOff() - Removes the row level filter for a table.

c-treeDB C++ API methods

  • CTTable::SystemFilterOn() - Establish a row level filter for a table.
  • CTTable::SystemFilterOff() - Removes the row level filter for a table.

TOCIndex