The mi_qual_constant() accessor function
The mi_qual_constant() function retrieves the constant value that the WHERE clause specifies as a qualification-function argument.
Syntax
MI_DATUM mi_qual_constant(MI_AM_QUAL_DESC *qualDesc);
- qualDesc
- Points to the qualification descriptor.
Usage
To retrieve the constant value from the argument lists of a qualification function, call mi_qual_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 if 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_constant() from am_getnext to retrieve the most recent value for the host variable and do not save the value from mi_qual_constant() in user data for subsequent scans.
Return values
The MI_DATUM structure contains the value of the constant argument.
Related topics
- MI_DATUM in the IBM® Informix® DataBlade API Programmer's Guide