Runtime values as arguments
The statement-local variable (SLV) and host variable types of arguments supply values as the function executes.
Statement-local variables
CREATE FUNCTION stem(column LVARCHAR, OUT y CHAR)...
The VII includes functions to determine whether a qualification function includes an SLV argument and to manage its value. For more information about how the access method intercepts and sets SLVs, refer to the descriptions of the The mi_qual_needoutput() accessor function and The mi_qual_setoutput() accessor function.
SELECT...WHERE stem(lname, y # CHAR)
For more information about output parameters, the OUT keyword, and SLVs, see the HCL Informix® User-Defined Routines and Data Types Developer's Guide.
Host variables
SELECT...WHERE equal(lname, ?)
SELECT...WHERE in(SET{‘Smith’, ‘Smythe’, ?}, lname)
Because the value of a host variable applies to every row in the table, the access method treats the host variable as a constant. However, the constant that the client application supplies might change during additional scans of the same index. The access method can request that the optimizer re-evaluate the requirements of the qualification between scans.
Topic | Manual |
---|---|
Setting values for host variables in client applications | HCL Informix Enterprise Replication Guide |
Using DataBlade API functions from client applications | HCL Informix DataBlade API Programmer's Guide |
Using host variables in SQL statements | HCL Informix Guide to SQL: Syntax |