Home | Previous Page | Next Page   Using New Features in Dynamic Server > New Features in Version 9.3 >

DataBlade API Enhancements

This release includes the following improvements in the DataBlade API.

New PER_STMT_EXEC and PER_STMT_PREP Memory Durations

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.

Task Manual
Use the new memory durations. IBM Informix DataBlade API Programmer's Guide
Use memory durations in functions that have a duration argument. IBM Informix DataBlade API Function Reference
Use mi_dalloc() to specify a memory duration. IBM Informix Virtual-Table Interface Programmer's Guide
Allocate user-data memory with PER_STMT_EXEC memory duration. IBM Informix Virtual-Table Interface Programmer's Guide
Display information on the PRP.sessionid.threadid and EXE.sessionid.threadid pools. IBM Informix Administrator's Reference
(see onstat -g mem)

NULL Connections for mi_lo() Functions

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

New mi_collection_card() Function to Obtain Cardinality for Collections

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

Access to Files on a Client Computer One Buffer at a Time

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

New Callbacks to Handle Transactions

The database server invokes three new callbacks for transactions:

For details, see the IBM Informix DataBlade API Programmer's Guide.

New Function for Determining the Transaction State for DataBlades

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
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]