informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_func_desc_by_typeid()

The mi_func_desc_by_typeid() function looks up a registered user-defined routine by its routine identifier and returns its function descriptor.

Syntax

Usage

The mi_func_desc_by_typeid() function creates a function descriptor for the UDR that the routine_id argument specifies. The routine_id argument provides the routine identifier of the UDR. The function is one of the functions of the Fastpath interface. It is a constructor function for the function descriptor.

Tip: The DataBlade API provides the mi_funcid data type to hold routine identifiers. The mi_funcid data type has the same structure as the mi_integer data type. For backward compatibility, some DataBlade API functions still assume that routine identifiers are of type mi_integer.

This function performs the following tasks:

  1. Looks for a user-defined routine that matches the routine_id routine identifier in the sysprocedures system catalog table.
  2. Allocates a function descriptor for the UDR and saves the routine sequence in this descriptor.
  3. Allocates an MI_FPARAM structure for the routine and saves the argument and return-value information in this structure.
  4. Returns a pointer to the function descriptor that it has allocated for the user-defined routine.

The mi_func_desc_by_typeid() function allocates a new function descriptor in the PER_COMMAND memory duration.

Return Values

MI_FUNC_DESC * is a pointer to the function descriptor for the UDR that routine_id identifies.
NULL indicates that no matching user-defined routine was found or that the specified user-defined routine has multiple return values, which is possible with:

Related Topics

See the descriptions of the following functions: mi_routine_end(), mi_routine_exec(), mi_routine_get(), mi_routine_get_by_typeid(), and mi_routine_id_get().


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved