get_value_is_constant

Use the get_value_is_constant v4 API method to determine whether the specified input argument value is a constant.

Declaration

 short get_value_is_constant(
		void *          arg_handle,
		a_sql_uint32    arg_num,
		an_extfn_value *value_is_constant
		)

Usage

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.

Parameters

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.

Returns

1 if successful, 0 otherwise.

Related reference
_evaluate_extfn