Property :: rebuildIndex - Rebuild index
When an index is inconsistent in a way, that it is not complete, i.e. index entries are missing, the index can be rebuild completely. This works as long as the collection has more then one index.
The index to be repaired can be specified by parameters or when called without parameters the currently selected index will be rebuild. The function requires a second index, which is complete. This is usually the main index for the collection. When repairing the main index, the index name must be passed as parameter and it will be rebuild from the currently selected index.
The function throws an exception, when the index could not be completely rebuild.
Implementation overview
- Rebuild the currently selected index
Property :: rebuildIndex (  ) - Rebuild generic index
Property :: rebuildIndex ( sKeyName, sGenericType ) - Rebuild index for named key
Property :: rebuildIndex ( sKeyName )
Implementation details
-
Rebuild the currently selected index
Property  :: rebuildIndex (  )
The function rebuild the currently selected index. which must not be the main index. The main index is the source for rebuilding the currently selected index and should be complete.
to list
-
Rebuild generic index
Property  :: rebuildIndex ( odaba::String &sKeyName, odaba::String &sGenericType )
The generic index to be repaired is passed by the sKeyName and sGenericType parameters. In addition to the generic Index the collection must have a main index from which the generic index will be rebuild and which should be complete.
- sKeyName
- Key name
The key name must be the name of a key defined for the given structure. Thekey name is passed as string with maximum 40 characters.
In order to pass no key name, an empty string ( String() ) has to be passed.
- sGenericType
- Generic type name
The type for a generic attribute is a valid value from the basic enumeration of the generic attribute. The generic type name is a valid enumerator name. An empty string indicates an undefined generic type.
to list
- sKeyName
- Key name
-
Rebuild index for named key
Property  :: rebuildIndex ( odaba::String &sKeyName )
The index to be repaired is passed by the sKeyName parameter. The collection must have at least one further index. When sKeyName is not the main index, the index for sKeyName will be rebuild from the main index. In the case that sKeyName is the main index itself, it will be rebuild from the currently selected index, which must not be the main index.
- sKeyName
- Key name
The key name must be the name of a key defined for the given structure. Thekey name is passed as string with maximum 40 characters.
In order to pass no key name, an empty string ( String() ) has to be passed.
to list
- sKeyName
- Key name