Use the tibasSpaceDef_SetKeyDef() function to set a primary key definition for a specified space.
The keyDef parameter is a keyDef object that has previously been defined by calling the
tibasKeyDef_Create() function. The tibasKeyDefCreate() function creates a keyDef object, assigns the fields used as a primary index, and by default, assigns the index for the primary key the value TIBAS_INDEX_HASH. You can use the
tibasKeyDef_SetIndexType() function to change the index to TIBAS_INDEX_TREE if you want to use a tree index.