The mi_key_opclass_nsupt() accessor function

The mi_key_opclass_nsupt() function retrieves the number of support functions in the operator class associated with the key.

Syntax

mi_integer mi_key_opclass_nsupt(MI_AM_KEY_DESC *keyDesc,
   mi_integer keyNum)
keyDesc
Points to the key descriptor.
keyNum
Specifies the column number of a key in a composite-key index or 0 for a single-key index.

For the first (or only) key, pass 0 as keyNum. Increment keyNum by 1 for each subsequent key in a composite index.

Usage

The mi_key_opclass_nsupt() function returns the number of operator class support functions for a column in the index. It can be used to obtain the function names with the mi_key_opclass_supt() function.

For a multiple-column key, mi_key_opclass_nsupt() might return different values for each column. The integer argument keyNum specifies a column by sequential position the index key. A one-column index contains only keyNum 0. A two-column composite key contains keyNum 0 and 1. To determine the maximum keyNum value, call mi_key_nkeys(). If mi_key_nkeys() returns a value of 1 or greater, the index contains multiple key columns.

Return values

A positive integer indicates the number of support functions that the key descriptor contains for the specified key column.

A value of -1 indicates that keyNum specifies an invalid column number for the key.