company logo

Property :: repairKey - Check key value(s) in collection

The function checks, whether key values in currently selected index (sort order) correspond to key values in instance or not. When key values are different, the index will be updated by using the instance key. When this is not possible (because of duplicate key value), the function returns an error.

When an instance is positioned, the key for the positioned instance will be checked. When an instance is located, but not selected, an error will be returned. Otherwise, all instances in the collection regarding filter conditions are checked.

The function will not detect physical inconsistencies in indexes as missing index entries or invalid index trees. In order to repair this type of inconsistency, one may call repairIndex(), rebuildIndex() or repairCollection().

Notes:

The function works similar as callingto calling checkCollection("-C:K -R").

Return value:  Result string ( odaba::String & )

The result string contains the result of an action or operation.

Implementation details

odaba::String Property  :: repairKey (  )

The function returns a string containing repair protocol messages. Errors because of duplicate keys are shown in the protocol string.