Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbGetFilter

Retrieve the filter from the table.

Declaration

pTEXT ctdbGetFilter(CTHANDLE Handle)

Description

ctdbGetFilter() retrieves the current filter expression for the table.

To insert a filter, use ctdbFilterRecord(). To verify if there is a filter active in the table, use ctdbIsFilteredRecord().

  • Handle [in] the Table or record handle.

Returns

ctdbGetFilter() returns a pointer to a string with the filter expression. If no filters are active, return NULL.

Example

/* print the expression */

if (ctdbGetFilterType(hRecord) == CTFILTER_TEXT)

printf("Filter expression: %s\n", ctdbGetFilter(hRecord));

See also

ctdbFilterRecord(), ctdbIsFilteredRecord()

TOCIndex