Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbSetIndexCndxExpr

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

Declaration

CTDBRET ctdbSetIndexCndxExpr(CTHANDLE Handle, pTEXT conditionExpr)

Description

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.

Returns

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

See also

ctdbAlterTable(), ctdbGetCndxIndex(), ctdbGetCndxIndexByName()

TOCIndex