Use the get_value_is_constant v4 API method to determine whether the specified input argument value is a constant.
short get_value_is_constant( void * arg_handle, a_sql_uint32 arg_num, an_extfn_value *value_is_constant )
The UDF can ask whether a given argument is a constant. This is useful for optimizing a UDF, for example, where work can be performed once during the first call to the _evaluate_extfn function, rather than for every evaluation call.
Parameter | Description |
---|---|
arg_handle | Handle the arguments in the server. |
arg_num | The index value of the input argument being retrieved. Index values are 1..N. |
value_is_constant | Out parameter for storing is constant. |
1 if successful, 0 otherwise.