Property :: compareAccessKey - Compare keys according to current sort order
The function compares two key values for the current access key (accessKey property) . The keys are compared according to the data types of it's components.
The function returns -1 when the the value for the first key (vSortKey1) is lower than the value for the second key (vSortKey2). The function returns 1 when the the first value is higher than the second one. The function returns 0 when the keys are are equal.
The function throws an exception, when values are not comparable, i.e. when no access key is available for the property or when the property handle is invalid. The functions ignores key definitions, set for the parameters vSortKey1 and vSortKey2.
The result of a comparison is an integer value with the following meaning:
- 0: both operands have the same value
- 1: the calling operand is greater than the passed operand
- -1: the calling operand is smaller than the passed operand
Implementation details
- vSortKey1
- 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
- vSortKey2
- 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