company logo

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

Implementation details

  1. 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.

  2. to list
  3. 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.

  4. to list
  5. Reset fixed key components
    Property  :: fixKeyComponents (  )
  6. to list