Data structures for smart large objects
Because a smart large object can be huge, has two alternatives to store the content of a smart large object.
Therefore, instead of storing the content of a smart large object in a database table,
does the following:
- Stores the content of the smart large object in an sbspace
- Stores a pointer to the smart large object in the database table
Because a smart large object can be huge, the HCL
OneDB™ ODBC Driver application cannot receive a
smart large object in a variable. Instead, the application sends or receives information
about the smart large object in a data structure. The following table describes the data
structures that HCL
OneDB ODBC Driver uses for
smart large objects.
Data structure | Name | Description |
---|---|---|
lofd | Smart-large-object file descriptor | Provides access to a smart large object. Uses a file descriptor to access smart-large-object data as if it were in an operating-system file. |
loptr | Smart-large-object pointer structure | Provides security information and a pointer to a smart large object. This structure is the data that the database server stores in a database table for a smart large object. Therefore, SQL statements such as INSERT and SELECT accept a smart-large-object pointer structure as a value for a column or a parameter that has a data type of smart large object. |
lospec | Smart-large-object specification structure | Specifies the storage characteristics for a smart large object. |
lostat | Smart-large-object status structure | Stores status information for a smart large object. Normally you can fetch a user-defined data type (UDT) in either binary or character representation. However, it is not possible to convert a smart-large-object status structure to character representation. Therefore, you need to use SQL_C_BINARY as the HCL OneDB ODBC Driver C data type for lostat. |
Restriction: These data structures are opaque to HCL
OneDB ODBC Driver applications and their
internal structures might change. Therefore, do not access the internal structures
directly. Use the smart-large-object client functions to manipulate the data
structures.
The application is responsible for allocating space for these smart-large-object data structures.