Interpret the qualification descriptor
A qualification descriptor contains the individual qualifications that the WHERE clause specifies. A qualification, or filter, tests a value from a row against a constant value. Each branch or level of a WHERE clause specifies either a function or a Boolean expression.
The WHERE clause might include negation indicators, each of which reverses the result of a particular function.
The access
method executes virtual-index interface (VII) accessor functions to
extract individual qualifications from a qualification descriptor.
The following table lists frequently used accessor functions.
Accessor function | Purpose |
---|---|
mi_qual_nquals() | Determines the number of simple functions and Boolean operators in a complex qualification |
mi_qual_qual() | Points to one qualification in a complex qualification descriptor or to the only qualification |
mi_qual_issimple() mi_qual_boolop() |
Determines which of the following qualifications
the descriptor describes:
|
mi_qual_funcid() or mi_qual_funcname() | Identifies a simple function by function identifier or function name |
mi_qual_column() | Identifies the column argument of a function |
mi_qual_constant() | Extracts the value from the constant argument of a function |
mi_qual_negate() | Returns MI_TRUE if the qualification includes the operator NOT |
mi_qual_setvalue() | Sets a MI_VALUE_TRUE or MI_VALUE_FALSE indicator for one qualification in a complex qualification descriptor |
mi_qual_value() | Retrieves the results that mi_qual_setvalue() set for a previous qualification Until the qualification sets a result, this function returns the initial value, MI_VALUE_NOT_EVALUATED. |