Property :: fixKeyComponents - Fix key component values
The function fixes a number of high level key component values, i.e. it acts like a filter, which requires certain values for a number of top key components. Similar to a filter condition, the function reduces the number of instances, which can be read via the property handle. One may call position(), next() or getRelative() in order to read consecutive instances from the restricted collection. relativeCount() returns the instance count in the restricted collection.
In order to reset fixed key components one may call the function without parameters.
The function reset previous key selections or implicitly defined key selections (e.g. when opening a property path). The function does work on regular collections, only, i.e. on persistent or transient collections with defined access keys (indexes). Key selections are reset automatically, when selecting another access key.
The function throws an exception, when no key value could be located.
Implementation overview
- Fix key components for passed key value
Property :: fixKeyComponents ( vSortKey, iKeyLevel ) - Fix currently located key
Property :: fixKeyComponents ( iKeyLevel ) - Reset fixed key components
Property :: fixKeyComponents (  )
Implementation details
-
Fix key components for passed key value
Property  :: fixKeyComponents ( odaba::Key vSortKey, int32 iKeyLevel )
The key components to be fixed are taken from the key value passed in vSortKey.
The number of key components to be fixed is passed in iKeyLevel.
- vSortKey
- Access key
The sort or access key value is provided as typed string in ESDF or CSV format. Key components can be separated by '|' or ';'.
// key: name;first_name
Miller;Paul // simple positioned CSV key
"Miller";"Paul Mary" // special characters must be quoted
- iKeyLevel
- Number of fixed key component
The switch level defines the key component number that need not change when calling next() or locateKey() beginning with 1 for the first key component.
to list
- vSortKey
- Access key
-
Fix currently located key
Property  :: fixKeyComponents ( int32 iKeyLevel )
The key components to be fixed are taken from the currently located key value.
The number of key components to be fixed is passed in iKeyLevel.
- iKeyLevel
- Number of fixed key component
The switch level defines the key component number that need not change when calling next() or locateKey() beginning with 1 for the first key component.
to list
- iKeyLevel
- Number of fixed key component
- to list