EXTFNAPIV4_DESCRIBE_UDF_NUM_PARMS Attribute (Set)

The EXTFNAPIV4_DESCRIBE_UDF_NUM_PARMS attribute indicates the number of parameters. Used in a describe_udf_set scenario.

Data Type

a_sql_uint32

Description

The number of parameters supplied to the UDF.

Usage

If the UDF sets this property, the server compares the value with the number of parameters supplied in the CREATE PROCEDURE statement. If the two values do not match, the server returns a SQL error. This allows the UDF to ensure the CREATE PROCEDURE statement has the same number of parameters expected by the UDF.

Returns

On success, returns the sizeof(a_sql_uint32).

On failure, returns one of the generic describe_udf errors, or:
  • EXTFNAPIV4_DESCRIBE_BUFFER_SIZE_MISMATCH – Set error returned if the describe buffer is not the size of a_sql_uint32.
  • EXTFNAPIV4_DESCRIBE_INVALID_STATE – Set error returned if the state is not equal to Annotation.
  • EXTFNAPIV4_DESCRIBE_INVALID_ATTRIBUTE_VALUE – set error returned if the UDF tries to reset the parameter datatype.

Query processing states