The mi_qual_param_constant() accessor function
The mi_qual_param_constant() function retrieves the constant value for the specified parameter.
Syntax
MI_DATUM mi_qual_param_constant(MI_AM_PARAM_DESC *paramDesc);
- paramDesc
- Points to the parameter descriptor.
Usage
To retrieve the constant value from the argument lists of a qualification function, call mi_qual_param_constant() from the am_beginscan or am_getnext purpose function.
Qualification functions evaluate the contents of a column against some criteria, such as a supplied constant value.
WHERE equal(name,'harry')
WHERE equal(name,? )
To determine whether a function involves a host variable argument, execute mi_qual_const_depends_hostvar() in the am_scancost purpose function. If mi_qual_const_depends_hostvar() returns MI_TRUE, call mi_qual_param_constant() from am_getnext to retrieve the most recent value for the host variable and do not save the value from mi_qual_param_constant() in user data for subsequent scans.
Return values
The MI_DATUM structure contains the value of the constant argument.