mi_integer mi_key_funcid(MI_AM_KEY_DESC *keyDesc, mi_integer keyNum)
For the first (or only) key, pass 0 as keyNum. Increment keyNum by one for each subsequent key in a composite index.
A UDR returns the values that make up a functional index. For example, the following statement creates an index from the values that the box() function returns:
CREATE INDEX box_func_idx ON zones (box(x1,y1,x2,y2)) USING map_am;
Use the DataBlade API FastPath facility to obtain values for function-based index keys.
A positive integer identifies the function that creates the values in the keyNum position of a composite-key index.
A return value of 0 indicates that the specified keyNum contains column values and does not belong to a functional index.
A negative value indicates that the CREATE INDEX statement specifies an unknown function to create the key.
See the discussions of: