The mi_type_qualifier() function

The mi_type_qualifier() function obtains the qualifier of a data type from its type descriptor.

Syntax

mi_integer mi_type_qualifier(type_desc)
   MI_TYPE_DESC *type_desc;
type_desc
A pointer to the type descriptor from which to obtain the qualifier.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_type_qualifier() function obtains the data type qualifier from the type descriptor that type_desc references. The qualifier is the number of time increments to store for a date and/or time data type: DATETIME and INTERVAL. If you call mi_type_qualifier() on some other data type, the function returns -1.

This function returns an encoded integer value that the database server uses internally to represent a qualifier. You can use the qualifier constants and macros (such as TU_START and TU_END) to use this encoded value.

For information about type-descriptor accessor functions or about qualifiers, see the HCL OneDB™ DataBlade® API Programmer's Guide.

Return values

>=0
The encoded integer qualifier of the data type in type_desc.
MI_ERROR
The function was not successful.