Obtain a function descriptor

A function descriptor, MI_FUNC_DESC, contains static information about a UDR that is to be invoked with the Fastpath interface. It is basically a structured version of the row in the sysprocedures system catalog table that describes the UDR. The function descriptor also identifies the routine sequence for the associated UDR.

The following table summarizes the memory operations for a function descriptor.
Memory duration Memory operation Function name
PER_COMMAND Constructor mi_cast_get(), mi_func_desc_by_typeid(), mi_routine_get(), mi_routine_get_by_typeid(), mi_td_cast_get()
PER_COMMAND Destructor mi_routine_end()
Tip: Function descriptors are stored with the connection descriptor. Because a connection descriptor has a PER_COMMAND duration, so too does a function descriptor. However, it is possible to obtain a session-duration connection descriptor and, consequently, session-duration function descriptors.
A calling DataBlade® API module uses a function descriptor as a handle to identify the UDR it needs to invoke with the Fastpath interface. To obtain a function descriptor, call one of the Fastpath look-up functions in the following table.
Table 1. Fastpath look-up functions
Type of UDRs Fastpath look-up function
Looking up general UDRs mi_func_desc_by_typeid(), mi_routine_get(), mi_routine_get_by_typeid()
Looking up cast functions mi_cast_get(), mi_td_cast_get()