Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbSetDefaultIndexByName

Set the default index by its name

Declaration

CTDBRET ctdbSetDefaultIndexByName(CTHANDLE Handle, pTEXT name)

Description

ctdbSetDefaultIndexByName() sets the default index by its name. See the discussion on the default index presented in the ctdbSetDefaultIndex() function. Use ctdbGetDefaultIndexName() to retrieve the table default index name. Use ctdbSetDefaultIndex() to set the table default index by number.

  • Handle [in] the record handle.
  • name [in] the index name to be set as default.

Returns

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

See also

ctdbAllocRecord(), ctdbGetDefaultIndexName(), ctdbSetDefaultIndex()

TOCIndex