This release includes the following improvements in the DataBlade API.
When a user-defined routine (UDR) calls a memory-allocation function, the memory exists until the duration assigned to that memory expires. The PER_STMT_PREP memory duration lasts for the life of a prepared statement. The PER_STMT_EXEC memory duration lasts for the duration of the SQL statement.
Use the PER_STMT_EXEC and PER_STMT_PREP memory durations instead of the PER_STATEMENT memory duration.
The DataBlade API provides a set of mi_lo*() functions for handling smart large objects. This feature permits a NULL connection using the same error-handling behavior as with a valid connection. To use mi_lo*() functions without a connection, specify the NULL argument.
Task | Manual |
---|---|
Pass a NULL connection to an mi_lo*() function. | IBM Informix DataBlade API Programmer's Guide |
Specify a NULL connection in a call to an mi_lo*() routine that takes a connection descriptor. | IBM Informix DataBlade API Function Reference |
Use the mi_collection_card() function in a UDR to return the cardinality of a collection (the number of items in a collection such as LIST, SET, and MULTISET).
Task | Manual |
---|---|
Determine the cardinality of a collection. | IBM Informix DataBlade API Programmer's Guide |
Use the mi_collection_card() function. | IBM Informix DataBlade API Function Reference |
Use LIST, MULTISET, and SET data types. | IBM Informix Guide to SQL: Reference |
The DataBlade API provides a set of mi_file*() functions for performing I/O operations on files. Previously, the mi_file*() functions transferred the entire file to the client computer but now these functions can transfer the file one buffer at a time.
Task | Manual |
---|---|
Access client files one buffer at a time. | IBM Informix DataBlade API Programmer's Guide |
Open a file on the client by passing the MI_O_CLIENT_FILE flag to mi_file_open(). | IBM Informix DataBlade API Function Reference |
The database server invokes three new callbacks for transactions:
For details, see the IBM Informix DataBlade API Programmer's Guide.
The mi_transaction_state() function returns the current transaction state for a DataBlade module to the caller. The transaction states are none, implicit, or explicit.
Task | Manual |
---|---|
Determine the state of a transaction. | IBM Informix DataBlade API Programmer's Guide |
Use the mi_transaction_state() function. | IBM Informix DataBlade API Function Reference |