Functions that perform input and output on a smart large object

The smart-large-object interface for HCL Informix® includes functions that provide basic file operations such as create, open, seek, read, write, alter, and truncate.

These routines bypass the query processor, executor, and optimizer, and give the application direct access to a smart large object. These functions use an LO file descriptor to identify the open smart large object.

The following table shows the basic file-like operations on a smart large object with the smart-large-object function that performs them and the analogous operating-system calls for file operations.
Table 1. Main DataBlade® API functions of the smart-large-object interface
Smart-large-object operation Smart-large-object function Operating-system call
Open the smart large object that the LO handle identifies: the open operation generates an LO file descriptor for the smart large object. mi_lo_open() open()
Seek to the desired LO seek position to begin a read or write operation. mi_lo_seek() seek()
Obtain the current LO seek position. mi_lo_tell() tell()
Lock the specified number of bytes of data. mi_lo_lock() lock()
Perform the read or write operation for the specified number of bytes. mi_lo_read(), mi_lo_readwithseek(), mi_lo_write(), mi_lo_writewithseek() read(), write()
Unlock the specified number of bytes of data. mi_lo_unlock() unlock()
Obtain status information about a particular smart large object. mi_lo_stat() stat()
Truncate smart-large-object data at a specified location. mi_lo_truncate() truncate()
Close the smart large object and free the LO file descriptor. mi_lo_close() close()