Use the _evaluate_extfn v4 API method as a required function pointer that is called for each invocation of the function on a new set of argument values.
_evaluate_extfn( a_v4_extfn_proc_context *cntxt, void *args_handle )
The _evaluate_extfn function must describe to the server how to fetch results by filling in the a_v4_extfn_table_func portion of the a_v4_extfn_table structure and use the set_value method on the context with argument zero to send this information to the server. This function must also inform the server of its output schema by filling in the a_v4_extfn_value_schema of the a_v4_extfn_table structure before calling set_value on argument 0. It can access its input argument values via the get_value callback function. Both constant and nonconstant arguments are available to the UDF at this time.
Parameter | Description |
---|---|
cntxt | The procedure context object. |
args_handle | Handle to the arguments in the server. |