Home | Previous Page | Next Page   Design Decisions > Supporting Data Retrieval, Manipulation, and Return >

Converting to and from Row Format

Before the access method can return key values to a query, the access method must convert source data to data types that the database server recognizes.

To create a row
  1. Call mi_tab_rowdesc() to retrieve the row descriptor.
  2. Call the appropriate DataBlade API row-descriptor accessor functions to obtain the information for each column.

    For a list of available row-descriptor accessor functions, refer to the description of MI_ROW_DESC in the IBM Informix: DataBlade API Programmer's Guide.

  3. If necessary, convert external data types to types that the database server recognizes.
  4. Set the value of the columns that the query does not need to NULL.
  5. Call the DataBlade API mi_row_create() function to create a row from the converted source data.
Tip:
The mi_row_create() function can affect performance because it requires database server resources. Use it only if you set the am_keyscan purpose flag for the access method.

The database server passes an MI_ROW structure to the am_insert and am_update purpose functions. To extract the values to insert or update, call mi_value() or mi_value_by_name(). For more information about these functions, refer to the IBM Informix: DataBlade API Programmer's Guide.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]