The mi_func_isvariant() function

The mi_func_isvariant() function determines whether a user-defined function is variant.

Syntax

mi_integer mi_func_isvariant(funcdesc_ptr)
   MI_FUNC_DESC *funcdesc_ptr;
funcdesc_ptr
A pointer to a function descriptor for a user-defined function.
Valid in client LIBMI application? Valid in user-defined routine?
No Yes

Usage

The mi_func_isvariant() function determines whether the user-defined function associated with the funcdesc_ptr function descriptor is variant or nonvariant. A user-defined function is variant if it behaves in either of the following ways:
  • Returns different results when it is invoked with the same arguments
  • Modifies a database or variable state

You can register a user-defined function as variant with the VARIANT routine modifier. If you do not specify the VARIANT or NOT VARIANT routine modifier with the CREATE FUNCTION statement, the user-defined function is variant.

The mi_func_isvariant() function is one of the functions of the Fastpath interface.

Return values

1
The UDR that the funcdesc_ptr function descriptor identifies is variant.
2
The UDR that the funcdesc_ptr function descriptor identifies is not variant.
MI_ERROR
The function was not successful.