Home | Previous Page | Next Page   Programming DataBlade Module Routines in C > Editing Opaque Type Support Routines in opaque.c >

LOhandles() Function

The Informix 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:

  1. Allocates an mi_bitvarying variable to hold the MI_LO_HANDLES structure
  2. Copies valid large object handles into the los array in the MI_LO_HANDLES structure
  3. Sets the MI_LO_HANDLES nlos member to the number of large objects in the array
  4. Returns a pointer to the MI_LO_HANDLES structure
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]