The mi_column_typedesc() function
The mi_column_typedesc() function obtains the type descriptor of the specified column from a row descriptor.
Syntax
MI_TYPE_DESC *mi_column_typedesc(row_desc, column_id)
MI_ROW_DESC *row_desc;
mi_integer column_id;
- row_desc
- A pointer to the row descriptor of the row that contains the column.
- column_id
- The column identifier, which specifies the position of the column in the specified row descriptor. Column numbering follows C array-indexing conventions: the first column in the row is at position zero.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
A row descriptor can describe the
structure of a row in a table or the structure of a row type. From
the row descriptor that row_desc references, the mi_column_typedesc() function
obtains the type descriptor of a column for either structure:
- The type descriptor for the column at position column_id in the row
- The type descriptor for the field at position column_id for the row type
The type descriptor is a DataBlade® API structure that provides information about a data type.
For more information about row descriptors or about type descriptors, see the Informix® DataBlade® API Programmer's Guide.
Return values
- An MI_TYPE_DESC pointer
- A pointer to the type descriptor for the specified column or field.
- NULL
- The function was not successful.