The lld_locator data type

The lld_locator data type identifies a large object. It specifies the kind of large object and provides a pointer to its location. lld_locator is a row type and is defined as follows:
create row type informix.lld_locator 
   {
   lo_protocol                  char(18
   lo_pointer           informix.lld_lob0
   lo_location           informix.lvarchar
   }   
lo_protocol
Identifies the kind of large object.
lo_pointer
A pointer to a smart large object, or is NULL if the large object is any kind of large object other than a smart large object.
lo_location
A pointer to the large object, if it is not a smart large object. Set to NULL if it is a smart large object.
In the lo_protocol field, specify the kind of large object to create. The kind of large object you specify determines the values of the other two fields:
  • If you specify a smart large object:
    • use the lo_pointer field to point to it.
    • specify NULL for the lo_location field.
  • If you specify any other kind of large object:
    • specify NULL for the lo_pointer field.
    • use the lo_location field to point to it.

The lo_pointer field uses the lld_lob data type, which is defined by Large Object Locator. This data type allows you to point to a smart large object and specify whether it is of type BLOB or type CLOB. For more information, see The lld_lob data type.

The lo_location field uses an lvarchar data type, which is a varying-length character type.

The following table lists the current protocols and summarizes the values for the other fields based on the protocol that you specify. Be sure to check the release notes shipped with this publication to see if Large Object Locator supports additional protocols not listed here.
Tip: Although the lld_locator type is not currently extensible, it might become so later. To avoid future name space collisions, the protocols established by Large Object Locator all have an IFX prefix.
Table 1. Fields of lld_locator data type
lo_protocollo_pointerlo_location Description
IFX_BLOBPointer to a smart large objectNULLSmart large object
IFX_CLOB Pointer to a smart large objectNULLSmart large object
IFX_FILENULL pathnameFile accessible on server
Important: The lo_protocol field is not case-sensitive. It is shown in uppercase letters for display purposes only.

The lld_locator type is an instance of a row type. You can insert a row into the database using an SQL INSERT statement, or you can obtain a row by calling the DataBlade® API mi_row_create() function. See the HCL OneDB™ ESQL/C Programmer's Manual for information about row types. See the HCL OneDB DataBlade API Programmer's Guide for information about the mi_row_create() function.

To reference an existing large object, you can insert an lld_locator row directly into a table in the database.

To create a large object, and a reference to it, you can call the lld_create() function and pass an lld_locator row.