DataBlade API functions

The DataBlade® API functions begin with the mi_ prefix. The milib.h header file declares most of these DataBlade API functions.

The mi.h header file automatically includes milib.h. You must include mi.h in any DataBlade API module that uses a DataBlade API function.

The functions of the DataBlade API function library can be divided into the categories shown in the following table.

Table 1. Categories of DataBlade API functions

This table lists categories of DataBlade API functions with links to topics that contain more information. The table is divided into parts. The first part lists data handling categories. The next part of the table lists session, thread, and transaction management categories. The remaining parts of the table list SQL statement processing categories, categories for executing user-defined routines, memory management categories, exception handling categories, smart-large object interface categories, an operating system file category, and a tracing category.

Category of DataBlade API functions More information
Data handling:
Obtaining type information Type identifiers

Type descriptors

Transferring data types between computers (database server only) Conversion of opaque-type data with computer-specific data types
Converting data to a different data type DataBlade API functions for date conversion

DataBlade API functions for date-time or interval conversion

DataBlade API functions for decimal conversion

DataBlade API functions for string conversion

Handling collections: sets, multisets, and lists Collections
Converting between code sets (database server only) Internationalization of DataBlade API modules (GLS)
Handling collections Collections
Managing varying-length structures Varying-length data type structures
Obtaining SERIAL values Process insert results
Handling NULL values SQL NULL value
Session, thread, and transaction management:
Obtaining connection information Connection parameters

Database parameters

Session parameters

Establishing a connection Establish a connection
Initializing the DataBlade API Initialize the DataBlade API
Managing HCL Informix threads (database server only) Yield the CPU VP

Manage stack usage

Obtaining transaction and server-processing state changes A transition descriptor
SQL statement processing:
Sending SQL statements Execute basic SQL statements

Execute prepared SQL statements

Obtaining statement information Return a statement descriptor

Obtain input-parameter information

Obtaining result information Process statement results
Retrieving rows and row data (also row types and row-type data) Obtain row information

Retrieve rows

Retrieving columns Obtain column information

Obtain column values

Using save sets Save sets
Executing user-defined-routines:
Accessing an MI_FPARAM structure Access MI_FPARAM routine-state information
Allocating an MI_FPARAM structure A user-allocated MI_FPARAM structure
Using the Fastpath interface Call UDRs with the Fastpath interface
Accessing a function descriptor Obtain information from a function descriptor
Executing selectivity and cost functions: Write selectivity and cost functions
Memory management:
Managing user memory Manage user memory
Managing named memory (database server only) Manage named memory
Exception handling:
Raising a database exception Raise an exception
Accessing an error descriptor An error descriptor,

Handling multiple exceptions

Using callback functions Invoke a callback
Smart-large-object interface:
Creating a smart large object Functions that create a smart large object
Performing I/O on a smart large object Functions that perform input and output on a smart large object
Moving smart large objects to and from operating-system files Functions that move smart large objects to and from operating-system files
Manipulating LO handles Functions that manipulate an LO handle
Handling LO-specification structures Functions that access an LO-specification structure
Handling smart-large-object status Functions that access an LO-status structure
Operating-system file interface: Access to operating-system files
Tracing (database server): Tracing

For a complete list of DataBlade API functions in each of these categories, see the Informix DataBlade API Function Reference, which provides descriptions of the regular public and advanced functions, in alphabetical order. For more information about advanced functions of the DataBlade API, see Advanced features (Server).

If an error occurs while a DataBlade API function executes, the function usually indicates the error with one of the following return values.
Way to indicate an error More information
Functions that return a pointer return the NULL-valued pointer NULL-valued pointer
Functions that return an mi_integer value (or other integer) return the MI_ERROR status code Handling errors from DataBlade API functions
Functions that raise an exception Handling errors from DataBlade API functions