|
Find and retrieve a key in an index.
- Parameters:
-
hDb |
Database handle. |
uiIndex |
Index the key is to be retrieved from. |
uiContainerNum |
If the index is a cross-container index, this may be used to specify a particular container the found key should be pointing to. A value of zero indicates that any container will do. |
pSearchKey |
Key to be searched for. NOTE: The actual key retrieved depends on the uiFlags parameter as well. |
uiSearchDrn |
DRN in the key's reference set that is to be searched for. If a zero is passed in this parameter, only a key search is done, not a key+reference search. |
uiFlags |
Flags used in conjunction with the pSearchKey and uiSearchDrn parameters to determine the key/DRN that should be retrieved. Flags may be ORed together and are as follows:
- FO_INCL - Return either the exact key+reference specified by pSearchKey and uiSearchDrn or the next key+reference after. NOTE: This flag may be used in conjunction with the FO_KEY_EXACT flag - see documentation below
- FO_EXCL - Retrieve the key+reference that comes after the key+reference specified by pSearchKey and uiSearchDrn. NOTE: This flag may be used in conjunction with the FO_KEY_EXACT flag - see documentation below
- FO_KEY_EXACT - This flag is used in conjunction with the FO_INCL and FO_EXCL flags. It specifies that FlmKeyRetrieve() is NOT to go to the next key in the index, but confine itself to references for the key specified in pSearchKey. If there are no more references for the key specified in pSearchKey, FlmKeyRetrieve() will return RCODE::FERR_EOF_HIT, even if there are keys that come after pSearchKey
- FO_EXACT - Retrieve the exact key+reference specified by pSearchKey and uiSearchDrn. If there is no such key+reference, the function should return RCODE::FERR_NOT_FOUND
- FO_FIRST - Retrieve the first key+reference in the index. If this flag is passed in, all other flags will be ignored, as will pSearchKey and uiSearchDrn
- FO_LAST - Retrieve the last key+reference in the index. If this flag is passed in, all other flags will be ignored except for FO_FIRST (which takes precedence over FO_LAST if they are both set), as will pSearchKey and uiSearchDrn
|
ppFoundKey |
If non-NULL, found key is returned here. |
puiFoundDrn |
If non-NULL, found reference (DRN) is returned here. |
|