The LOhandles() function
The HCL OneDB™ database server calls the LOhandles() function to retrieve the smart large object handles or list of smart large object handles used by an opaque type. The LOhandles() function receives a pointer to the opaque type and a pointer to an MI_FPARAM structure.
The LOhandles() function returns a
pointer to an mi_bitvarying variable containing an MI_LO_HANDLES structure.
BladeSmith defines MI_LO_HANDLES in the generated header file;
it is not part of the DataBlade®
API.
The structure holds a list of MI_LO_HANDLE structures. It has
the following definition:
/* This data structure returned by LOhandles. */
typedef struct
{
mi_integer nlos; /* Number of large object handles. */
MI_LO_HANDLE los[1]; /* Valid large object handles. */
} MI_LO_HANDLES;
The LOhandles() function calls the mi_lo_validate() function
for each large object in the opaque type structure, accumulating a
count of valid large objects. If there are no valid large objects
in the opaque type, the LOhandles() function returns 0
to
its caller.
If the opaque type contains valid large objects, the LOhandles() function
performs the following tasks:
- Allocates an mi_bitvarying variable to hold the MI_LO_HANDLES structure.
- Copies valid large object handles into the los array in the MI_LO_HANDLES structure.
- Sets the MI_LO_HANDLES nlos member to the number of large objects in the array.
- Returns a pointer to the MI_LO_HANDLES structure.