Query Criteria Definition Functions
[Query Functions]


Functions

FLMEXP RCODE FLMAPI FlmParseQuery (HFCURSOR hCursor, F_NameTable *pNameTable, const char *pszQueryCriteria)
 Parse a query string to set query criteria.
FLMEXP RCODE FLMAPI FlmCursorAddField (HFCURSOR hCursor, FLMUINT uiFieldNum, FLMUINT uiFlags)
 Add a field to the query criteria.
FLMEXP RCODE FLMAPI FlmCursorAddFieldPath (HFCURSOR hCursor, FLMUINT *puiFldPath, FLMUINT uiFlags)
 Add a field path to the query criteria.
FLMEXP RCODE FLMAPI FlmCursorAddUserPredicate (HFCURSOR hCursor, FlmUserPredicate *pPredicate)
 Add an application defined predicate to the query criteria.
FLMEXP RCODE FLMAPI FlmCursorAddFieldCB (HFCURSOR hCursor, FLMUINT *puiFldPath, FLMUINT uiFlags, FLMBOOL bValidateOnly, CURSOR_GET_FIELD_CB fnGetField, void *pvAppData, FLMUINT uiUserDataLen)
 Add a field callback function to the query criteria.
FLMEXP RCODE FLMAPI FlmCursorAddOp (HFCURSOR hCursor, QTYPES eOperator, FLMBOOL bResolveUnknown=FALSE)
 Add a query operator to the query criteria.
FLMEXP RCODE FLMAPI FlmCursorAddValue (HFCURSOR hCursor, QTYPES eValType, void *pVal, FLMUINT uiValLen)
 Add a value to the query criteria.
FLMEXP RCODE FLMAPI FlmCursorValidate (HFCURSOR hCursor)
 Finalize and validate query syntax.

Function Documentation

FLMEXP RCODE FLMAPI FlmCursorAddField HFCURSOR  hCursor,
FLMUINT  uiFieldNum,
FLMUINT  uiFlags
 

Add a field to the query criteria.

Parameters:
hCursor  Handle to query object.
uiFieldNum  Field number that is to be added to query criteria.
uiFlags  Flags for field. Flags may be any of the following ORed together:
  • FLM_USE_DEFAULT_VALUE - This specifies that if the field is not found in a record that is being evaluated, FLAIM should use a default value. The default value is calculated based on the field's data type
  • FLM_SINGLE_VALUED - This tells FLAIM that the field is known to never have more than one value per record. This allows FLAIM to evaluate the predicate using information from an index key, without having to fetch the record to evaluate all possible values

FLMEXP RCODE FLMAPI FlmCursorAddFieldCB HFCURSOR  hCursor,
FLMUINT *  puiFldPath,
FLMUINT  uiFlags,
FLMBOOL  bValidateOnly,
CURSOR_GET_FIELD_CB  fnGetField,
void *  pvAppData,
FLMUINT  uiUserDataLen
 

Add a field callback function to the query criteria.

This function can be called anywhere an application might call FlmCursorAddField() or FlmCursorAddFieldPath(). Added a field callback function gives the application more flexibility in how fields are retrieved from records and validated. Special processing rules may be applied to determine if a field is valid. In addition, the callback function may be used to determine the field to be returned - even fetching it from other records or external sources.

Parameters:
hCursor  Handle to query object.
puiFldPath  Field path. This field path is passed into the field callback when it is called.
uiFlags  Flags for field. See documentation on uiFlags parameter of FlmCursorAddField().
bValidateOnly  Field should only be validated by the callback. Instances of the field to be validated will be found by FLAIM.
fnGetField  Field callback function.
pvAppData  Pointer to application data. This will be passed into the callback function when it is called.
uiUserDataLen  Length of data pointed to by pvAppData. FLAIM will copy the application data as needed. It uses memcpy to do this, so it should always be a simple structure instead of a structure with pointers to other structures - because FLAIM will not know to follow those pointers when copying the data.

FLMEXP RCODE FLMAPI FlmCursorAddFieldPath HFCURSOR  hCursor,
FLMUINT *  puiFldPath,
FLMUINT  uiFlags
 

Add a field path to the query criteria.

Parameters:
hCursor  Handle to query object.
puiFldPath  Field path that is to be added to query criteria. Field path is an array of zero-terminated field numbers.
uiFlags  Flags for field. See documentation on uiFlags parameter of FlmCursorAddField().

FLMEXP RCODE FLMAPI FlmCursorAddOp HFCURSOR  hCursor,
QTYPES  eOperator,
FLMBOOL  bResolveUnknown = FALSE
 

Add a query operator to the query criteria.

Parameters:
hCursor  Handle to query object.
eOperator  Operator to be added to the query criteria.
bResolveUnknown  Resolve comparison operators to TRUE or FALSE even if one of the operands is unknown.

FLMEXP RCODE FLMAPI FlmCursorAddUserPredicate HFCURSOR  hCursor,
FlmUserPredicate pPredicate
 

Add an application defined predicate to the query criteria.

Parameters:
hCursor  Handle to query object.
pPredicate  User defined predicate object.

FLMEXP RCODE FLMAPI FlmCursorAddValue HFCURSOR  hCursor,
QTYPES  eValType,
void *  pVal,
FLMUINT  uiValLen
 

Add a value to the query criteria.

A value is generally added where an operand would appear - such as in a comparison expression.

Parameters:
hCursor  Handle to query object.
eValType  Type of value being added to the query criteria.
pVal  Pointer to the value being added. This should point to a value that corresponds to the type specified in eValType.
uiValLen  For binary values, this will contain the value length. It is not used for any other type of value. String values are expected to be null-terminated.

FLMEXP RCODE FLMAPI FlmCursorValidate HFCURSOR  hCursor  ) 
 

Finalize and validate query syntax.

After this function has been called, no more query criteria may be added.

Parameters:
hCursor  Handle to query object.

FLMEXP RCODE FLMAPI FlmParseQuery HFCURSOR  hCursor,
F_NameTable pNameTable,
const char *  pszQueryCriteria
 

Parse a query string to set query criteria.

Parameters:
hCursor  Handle to query object whose criteria is to be set.
pNameTable  Name table to use when looking up field names.
pszQueryCriteria  Query criteria.


Generated on Wed Oct 4 12:11:43 2006 for FLAIM by  doxygen 1.4.6