The mi_fp_getrow() function

The mi_fp_getrow() accessor function obtains the row structure that is associated with the user-defined routine from its MI_FPARAM structure.

Syntax

MI_ROW *mi_fp_getrow(fparam_ptr)
    MI_FPARAM *fparam_ptr;
fparam_ptr
A pointer to the associated MI_FPARAM structure.
Valid in client LIBMI application? Valid in user-defined routine?
No Yes

Usage

The mi_fp_getrow() function obtains the row structure for the user-defined routine that is associated with the fparam_ptr MI_FPARAM structure. The row structure contains the column values of the row with which the UDR invocation is associated. The row structure and column identifier identify the column with which the UDR invocation is associated. To get the column identifier of the column within the row structure, use the mi_fp_getcolid() function.

This function is valid only within an assign(), destroy(), or import support function for an opaque data type that contains smart large objects and for multirepresentational opaque types. Before executing the assign(), destroy(), or import function of an opaque data type, the database server automatically obtains the row structure and column identifier and stores them in the MI_FPARAM structure.

With the mi_fp_getrow() function, you can implement delayed creation or removal of a smart large object:
  • Delayed creation of a smart large object within the assign() support function

    This function can obtain the row structure into which you want to store the opaque type.

  • Delayed removal of a smart large object within the destroy() support function

    This function can obtain the row structure from which you want to remove the opaque type.

Important: The mi_fp_getrow() function is valid only when called from within an assign(), destroy(), or import support function of an opaque data type. Outside the context of an assign() or destroy() function, mi_fp_getrow() always returns a NULL-valued pointer.

For more information about UDR information in an MI_FPARAM structure, see the HCL OneDB™ DataBlade® API Programmer's Guide.

Return values

An MI_ROW pointer
A pointer to the row that is associated with the UDR.
NULL
The function was not successful or that it was not called from within an assign(), destroy(), or import support function of an opaque data type.