tibasKeyDef_SetIndexType()

Sets the index type used with a specified primary key.

Declaration

tibas_status tibasKeyDef_SetIndexType(
    tibasKeyDef      keyDef,
    tibas_indexType indexType)

Parameters

Parameter Description
keyDef Specifies the KeyDef for the key whose index type you want to set.
tibas_indexType Specifies the index type to set.

Remarks

Use the tibasKeyDef_SetIndex() function to specify the index type for a specified KeyDef. The index type can be one of the following:

TIBAS_INDEX_HASH
Specifies that indexing is done by using a hash table.
TIBAS_INDEX_TREE
Specifies that indexing is done using a tree.

When you initially create an index using the tibasKeyDef_Create() function, the index type is set to the default value, TIBAS_INDEX_HASH, which specifies that indexing is done by using a hash table.

You can call tibasKeyDef_SetIndexType() to set it to the alternate value TIBAS_INDEX_TREE, which specifies that indexing is done using a tree. Or, if it has been previously set to TIBAS_INDEX_TREE, you can set it back to TIBAS_INDEX_HASH.