Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 5 SpaceDef : SpaceDef Operations : tibasSpaceDef_SetKeyDef()

tibasSpaceDef_SetKeyDef()
Function
Declaration
tibas_status tibasSpaceDef_SetKeyDef(
tibasSpaceDef spaceDef,
tibasKeyDef keyDef)
Purpose
Sets the a primary key definition for a specified space.
Parameters
 
Remarks
Use the tibasSpaceDef_SetKeyDef() function to set a primary key definition for a specified space.
Using a primary key with the space can dramatically speed up searches, resulting in far fewer reads to locate a tuple.
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.
See Also
tibasSpaceDef_Create(), tibasKeyDef_Create(), tibasKeyDef_GetIndexType(), tibasKeyDef_SetIndexType(),
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved