The mi_funcarg_get_argtype() function

The mi_funcarg_get_argtype() function returns the argument type for the companion-UDR argument of a cost or selectivity function.

Syntax

MI_FUNCARG_TYPE mi_funcarg_get_argtype(funcarg_ptr)
   MI_FUNCARG *funcarg_ptr;
funcarg_ptr
A pointer to the MI_FUNCARG structure that describes the companion-UDR argument.
Valid in client LIBMI application? Valid in user-defined routine?
No Yes

Usage

The mi_funcarg_get_argtype() function returns the argument type from the MI_FUNCARG structure that funcarg_ptr references. The MI_FUNCARG structure describes an argument of a companion UDR to its cost or selectivity function. This argument type is represented by one of the following argument-type constants.
Companion-UDR argument type Argument-type constant
Argument is a constant value. MI_FUNCARG_CONSTANT
Argument is a column value. MI_FUNCARG_COLUMN
Argument is a parameter. MI_FUNCARG_PARAM

Use the mi_funcarg_get_argtype() function in a cost or selectivity function to determine the kind of argument passed into the companion UDR.

Return values

MI_FUNCARG_COLUMN
The companion-UDR argument is a constant value.
MI_FUNCARG_CONSTANT
The companion-UDR argument is a column value.
MI_FUNCARG_PARAM
The companion-UDR argument is a parameter.
MI_ERROR
The function was not successful.