FLAIM: Comparison Functions

- Main Page
- Modules
- Classes
- Files

# Comparison Functions
[Query Functions]

## Functions
FLMEXP RCODE FLMAPI | FlmCursorCompareDRNs (HFCURSOR hCursor, FLMUINT uiDRN1, FLMUINT uiDRN2, FLMUINT uiTimeLimit, FLMINT *piCmpResult, FLMBOOL *pbTimedOut, FLMUINT *puiKeyCount)
| Determine the relative position of two records in a query's result set.
FLMEXP RCODE FLMAPI | FlmCursorTestRec (HFCURSOR hCursor, FlmRecord *pRecord, FLMBOOL *pbIsMatch)
| Test a record to see if it passes the query criteria.
FLMEXP RCODE FLMAPI | FlmCursorTestDRN (HFCURSOR hCursor, FLMUINT uiDRN, FLMBOOL *pbIsMatch)
| Retrieve and test a record (using a DRN) to see if it passes the query criteria.

## Function Documentation

FLMEXP RCODE FLMAPI FlmCursorCompareDRNs | ( | HFCURSOR | hCursor,
|  | FLMUINT | uiDRN1,
|  | FLMUINT | uiDRN2,
|  | FLMUINT | uiTimeLimit,
|  | FLMINT * | piCmpResult,
|  | FLMBOOL * | pbTimedOut,
|  | FLMUINT * | puiKeyCount
| ) |

  | Determine the relative position of two records in a query's result set. This only makes sense if the query is optimized using an index. The function does the following: Reads the two records from the database Uses the query's index to get the index keys contained in the two records Compares the keys to determine which is greater Optionally gets an count of the keys between the two keys (count is inclusive). Parameters:
  hCursor | Handle to query object.
  uiDRN1 | DRN of first record to be compared.
  uiDRN2 | DRN of second record to be compated.
  uiTimeLimit | Timeout for this operation. Timeout is in seconds.
  piCmpResult | Comparison results is returned here.
  pbTimedOut | Did the function time out?
  puiKeyCount | Count of index keys betwen the two records (inclusive).

FLMEXP RCODE FLMAPI FlmCursorTestDRN | ( | HFCURSOR | hCursor,
|  | FLMUINT | uiDRN,
|  | FLMBOOL * | pbIsMatch
| ) |

  | Retrieve and test a record (using a DRN) to see if it passes the query criteria. Parameters:
  hCursor | Handle to query object.
  uiDRN | DRN of record to be tested against the query criteria. FLAIM will retrieve the record and test it. The container is the container that was passed into FlmCursorInit().
  pbIsMatch | Flag is returned here indicating whether or not the record matches the criteria.

FLMEXP RCODE FLMAPI FlmCursorTestRec | ( | HFCURSOR | hCursor,
|  | FlmRecord * | pRecord,
|  | FLMBOOL * | pbIsMatch
| ) |

  | Test a record to see if it passes the query criteria. Parameters:
  hCursor | Handle to query object.
  pRecord | Record to be tested against the query criteria.
  pbIsMatch | Flag is returned here indicating whether or not the record matches the criteria.