The C or C++ code of a user defined function must contain one module definition for an Aster instance to identify the entry point of the function and the interface it implements. A module definition is defined with the following macros given in FunctionModule.h:
- SQLMR_FUNCTION_MODULE_BEGIN
- SQLMR_FUNCTION_ENTRY
- SQLMR_FUNCTION_MODULE_END
SQLMR_FUNCTION_MODULE_BEGIN defines a structure (entry) of type SqlmrFunctionEntry, which contains the template for the UDAF/UDSF function. SQLMR_FUNCTION_ENTRY stores the function name and initializes the UDAF/UDSF function entry.