|
The DataBlade API provides the following support for byte data:
The DataBlade API supports the following data types that can hold byte data in a DataBlade API module.
Tip: The database server also supports the BYTE data type for byte data. It stores BYTE data as a simple large object. However, the DataBlade API does not directly support simple large objects. For more information, see Simple Large Objects.
mi_bitvarying Data Type
You can use a varying-length structure to store large amounts of byte data. The mi_bitvarying data type holds varying-length data that is nontext data. It stores this data in a varying-length structure. For general information about a varying-length structure, see Varying-Length Data Structures.
You can use a smart large object to store very large amounts of byte data. The MI_LO_HANDLE data type holds a structure, called an LO handle, that identifies the location of smart-large-object data in a separate database partition, called an sbspace. For smart-large-object data that is byte data, use the SQL BLOB data type. The BLOB data type allows you to store varying-length byte data of up to 4 terabytes. The BLOB data type is a predefined opaque type (an opaque data type that Informix defines). For more information, see Chapter 6, Using Smart Large Objects.
The DataBlade API provides the following support for byte data:
The DataBlade API supports the following byte functions from the ESQL/C library to perform operations on byte data.
To transfer byte data between different machine architectures, the DataBlade API provides the following functions that handle type alignment and byte order.
The mi_get_bytes() and mi_put_bytes() functions are useful in the send and receive support function of an opaque data type that contains uninterpreted bytes. They ensure that byte data remain aligned when transferred to and from client applications. For more information, see Converting Opaque-Type Data With Machine-Specific Data Types.