![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
tibas_status tibasKeyDef_Create(
Use the tibasKeyDef_Create() function to create a primary key and specify the fields for the key..The fieldnames parameter specifies a comma separated list of field names to be used as the primary key.
• If you do not already have a spaceDef object to which to assign the key definition, use the tibasSpaceDef_Create() function to a spaceDef object.
• Call the tibasSpaceDef_SetKeyDef() function to assign the KeyDef to a specified SpaceDef so that it can be used as the primary key for searches within the space.
When you call tibasKeyDef() to create a key, the default index type is TIBAS_INDEX_HASH. You can change the index type by calling the tibasKeyDef_SetIndexType() function.
Note also that if you need to change the primary key, you must free the space by calling the tibasSpace_Free() function and then reconnect to the space using the new key definition.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |