company logo

Property :: lastKey - Try locating last key

The function locates the last access key in the index. When the data source is unordered the function locates the last instance and extracts the primary key.

When a filter or key filter has been set, the function locates the last key or instance fulfilling the filter condition.

Usually, the instance will be located but not positioned. In case of instance filters or unordered collections, however, the instance will be selected.

The function returns true, when the last key has been located successfully. Otherwise it returns false. In case of read errors, the function throws an exception. When returning true, the function returns the first key value in rSortKey.

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation details

bool Property  :: lastKey ( odaba::Key &rCurrentKey )
  • rCurrentKey - Current key value

    The current key value is either the access key value, if the collection is ordered, or the primary key value if not.