The mi_qual_boolop() accessor function
The mi_qual_boolop() function retrieves the Boolean operator that combines two qualifications in a complex expression.
Syntax
MI_AM_BOOLOP mi_qual_boolop(MI_AM_QUAL_DESC *qualDesc);
- qualDesc
- Points to the qualification descriptor.
Usage
The access method first obtains results
for the simple functions in a complex qualification. To determine
how to combine the results that the access method has so far, it can
call the mi_qual_boolop() function.
Important: The database server has no means to detect if a secondary
access method does not set values for complex expressions.
If
the access method has no code to evaluate AND or OR, the am_scancost purpose
function can take the following precautions:
- Call mi_qual_boolop().
- If mi_qual_boolop() indicates the presence of an AND or OR operator, return a negative value from am_scancost to ensure that the optimizer does not use the access method to process the query.
Return values
- MI_BOOLOP_NONE
- Indicates that the current qualification does not contain a Boolean operator.
- MI_BOOLOP_AND
- Indicates that the current qualification contains a Boolean AND operator.
- MI_BOOLOP_OR
- Indicates that the current qualification contains a Boolean OR operator.