Execute qualification functions

There are alternative ways to process a simple function.

The routine identifier

The access method uses a routine identifier to execute a UDR with the DataBlade® API; FastPath facility. A qualification specifies a strategy UDR to evaluate index keys. To complete the qualification, the access method might also execute support UDRs. For information about FastPath and how to use it to execute strategy and support UDRs, see Using FastPath.
Tip: You can obtain the function descriptor in the am_beginscan purpose function, store the function descriptor in the PER_COMMAND user data, and call mi_scan_setuserdata() to store a pointer to the user data. In the am_getnext purpose function, call mi_scan_userdata() to retrieve the pointer, access the function descriptor, and execute the function with mi_routine_exec().

The function name

To extract the function name from the qualification descriptor, the access method calls the mi_qual_funcname() accessor function.

You can use mi_qual_funcname() to identify the function in a qualification, then directly call a local routine that implements it. For example, if the access method contains a local equal() function, it might include the following condition:
/* Compare function name to string.*/
if (strcmp("equal", mi_qual_funcname(qd)) == 0)
{ /* Execute equal() locally. */ }