Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic


Add, change, or delete the conditional expression associated with an index.


CTDBRET ctdbSetIndexCndxExpr(CTHANDLE Handle, pTEXT conditionExpr)


ctdbSetIndexCndxExpr() adds, changes, or deletes the conditional expression associated with an index. After the conditional expression is successfully associated with the index the index data is not automatically rebuilt. To retrieve the conditional expression, use ctdbGetCndxIndex() or ctdbGetCndxIndexByName().

  • Handle [in] the Table Handle.
  • conditionExpr [in] string containing the conditional expression.

Note: For updating the conditional expression of existing indexes, use ctdbAlterTable() with mode CTDB_ALTER_INDEX.


ctdbSetIndexCndxExpr() returns CTDBRET_OK on success, or c-treeDB API C API error code on failure.

See also

ctdbAlterTable(), ctdbGetCndxIndex(), ctdbGetCndxIndexByName()