Access predefined opaque data types
HCL OneDB™ implements several built-in data types as predefined opaque data types. These data types are opaque data types for which support functions and the database definition are provided. For example, the smart-large-object data types, CLOB and BLOB, as an opaque data type called clob and blob are implemented. uses the ifx_lo_t structure, called an LO-pointer, to access the smart large objects. This structure is defined in the locator.h header file.
Therefore, you declare host variables
for database columns of type CLOB or BLOB as a fixed binary host
variable, as follows:
EXEC SQL include locator;
⋮
EXEC SQL BEGIN DECLARE SECTION;
fixed binary 'clob' ifx_lo_t clob_loptr;
fixed binary 'blob' ifx_lo_t blob_loptr;
EXEC SQL END DECLARE SECTION;
⋮
EXEC SQL select blobcol into :blob_loptr from tab1;