The ITLargeObjectManager class
Base class: ITErrorManager
This functionality provided by this class is only supported with HCL Informix® databases.
Manipulates large objects. Large object operations are similar to normal file management operations (read, write, seek, and other operations). Client value objects based on large objects in the server typically expose an ITLargeObject interface. For details, see Object Containment and Delegation. See the Informix® Guide to SQL: Reference for details about large objects.
This class provides the following methods.
Method | Description |
---|---|
ITLargeObjectManager(const ITConnection &) | Creates a large object manager for the specified connection. |
ITBool SetHandleText(const ITString &handleText, int flags = MI_LO_RDWR) | Sets a manager to handle a large object, where const ITString is the large object handle in text format. |
const ITString &HandleText() | Returns the handle of the currently managed large object in a text format. |
ITBool SetHandle(const MI_LO_HANDLE *handle, int flags = MI_LO_RDWR) | Sets a manager to handle a large object, where const MI_LO_HANDLE is a pointer to the large object handle. |
const MI_LO_HANDLE *Handle() | Returns the handle of the currently managed large object in the binary format through the constant MI_LO_HANDLE. |
int Read(char *buf, int cnt) | Reads bytes from the large object at the current position. |
int Write(const char *buf, int cnt) | Writes bytes to the large object at the current position. |
ITInt8 Seek(ITInt8 off, int cntl = 0) | Sets the current position of the large object; cntl is a position like UNIX™ lseek (0 is absolute position, 1 is relative to current position, and 2 is relative to end of the large object). |
ITInt8 Size() | Returns the total size of the large object. |
ITBool SetSize(ITInt8) | Sets the total size of the large object. |
ITBool CreateLO(int flags = IT_LO_WRONLY | IT_LO_APPEND) | Creates a large object. Sets the handle of the manager to the new large object. The handle is then inserted into a table column (for example, by using a prepared SQL insert statement). |
ITBool CreateLO(MI_LO_SPEC*, int flags = IT_LO_WRONLY | IT_LO_APPEND) | Creates a large object with the specifications provided. |
ITBool Close() | Closes the smart large object managed by this ITLargeObjectManager
instance. Returns TRUE if the smart large object
was not open or was closed successfully. Returns FALSE on
failure. |