Handle smart large objects

If an opaque data type contains an embedded smart large object, you can define an lohandles() function for the opaque type. The lohandles() support function takes an instance of the opaque type and returns a list of the pointer structures for the smart large objects that are embedded in the data type. You might, for example, use a lohandles() function to provide information about which smart large object a given data type value is referencing.

The database server uses the lohandles() support function when it must search opaque-type values for references to smart large objects. The database server does not automatically call lohandles(). To execute this function, you must call it explicitly. You might use lohandles() for the following tasks:
  • Performing an archive of the database
  • Obtaining a reference count for the smart large objects
  • Running the oncheck utility
A lohandles() support function does not perform automatic incrementing and decrementing of the reference count for a smart large object. You must handle the reference count explicitly in the assign() and destroy() functions, as follows:
  • In the assign() function, increment the reference count with the DataBlade® API function mi_lo_increfcount().
  • In the destroy() function, decrement the reference count with the DataBlade API function mi_lo_decrefcount().
If you define an opaque type that references one or more smart large objects, you must consider defining the following support functions:
  • assign()
  • destroy()
  • update()
  • deepcopy()
  • An import function
  • An export function
  • An importbinary function
  • An exportbinary function

For more information about assign() and destroy() support functions, see Insert and delete data. For information about the import, export, importbinary, and exportbinary support functions, see Perform bulk copies.