Accessing support functions for a multiple-column key
To access support functions for a multiple-column key:
The sample syntax retrieves all the support functions.
Figure 1. Extracting
support functions for a multiple-column index key
MI_KEY_DESC * keyDesc;
mi_integer keyNum;
mi_integer sfunctNum;
mi_string sfunctName;
keynum = mi_key_nkeys(keyDesc);
for (k=0; k<= keyNum; k++)
{
sfunctNum = mi_key_opclass_nsupt(keyDesc, keyNum);
for (i=0; i<=sfunctNum; i++)
{
sfunctName =
mi_key_opclass_supt(keyDesc,
keyNum, sfunctNum);
/*
** Use the function name
** or store it in user data. (Not shown.) */
} /* End get sfunctName */
} /* End get sfunctNum */
} /* End get keynum */
The access method might need information about all the strategy functions for a particular key. For example, the access method might use the key descriptor rather than the qualification descriptor to identify strategy functions.