|
Informix DataBlade API Programmer's Manual DataBlade API Function
Descriptions
|
|
mi_routine_exec()
The mi_routine_exec() function executes the registered user-defined routine or cast function associated with a specified function descriptor.
Syntax
Usage
The mi_routine_exec() function is one of the functions of the Fastpath interface. It performs the following tasks:
- Copies the arguments into the function descriptor that funcdesc_ptr identifies.
- To obtain a function descriptor for the user-defined routine, use the mi_routine_get(), mi_routine_get_by_typeid(), mi_cast_get(), or mi_td_cast_get() function. The argument list specifies the arguments of the user-defined routine. If you do not specify an argument value, mi_routine_exec() uses the default value assigned to that argument. If the user-defined routine does not have any arguments, you can omit the argument list argument from mi_routine_exec().
- Executes the routine within the routine sequence of this function descriptor.
- The values within the corresponding MI_FPARAM structure for the routine are consistent between function invocations within the sequence. Use the mi_fparam_get() function to obtain this MI_FPARAM structure.
- Returns an MI_DATUM value that contains the return value of the executed user-defined routine.
- A NULL return value means that either the user-defined routine returned a NULL value or that the mi_routine_exec() function failed. The error argument holds the status of the mi_routine_exec() function. For more information on MI_DATUM values, see MI_DATUM Data Type.
The following call executes a user-defined function called a_func() that returns an integer value:
Important: You cannot use the Fastpath interface to execute iterator functions or SPL functions with the WITH RESUME keywords in their RETURN statement. For more information on iterator functions, see Writing an Iterator Function.
Return Values
See the descriptions of the following functions: mi_cast_get(), mi_fparam_get(), mi_routine_get(), mi_routine_get_by_typeid(), mi_routine_end(), and mi_td_cast_get().
Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved