Keywords

This is the list of valid keywords for use in service function prototypes:

LIBRARYIndicates the name of the .SO module an entry point is defined in.
ENTRYPOINTSpecifies a name for the entry point. By default, the name of the entry point is the function name.
INITFUNCTIONSpecifies the name of the initialization routine defined in the module containing the entry point. Currently, the initialization function is called once.
INCLUDEIndicates the function prototype is in the specified include file, so the generated CPP must #include that file. If INCLUDE is not specified, the C++ prototype is generated from the ECL function definition.
CIndicates the generated C++ prototype is enclosed within an extern "C" rather than just extern.
PUREIndicates the function returns the same result every time you call it with the same parameters and has no side effects. This allows the optimizer to make more efficient calls to the function in some cases.
ONCEIndicates the function has no side effects and is evaluated at query execution time, even if the parameters are constant. This allows the optimizer to make more efficient calls to the function in some cases.
FOLDSpecifies that the function is evaluated at compile time if all parameters are constants. Specifying FOLD to the SERVICE applys it to all function definitions in the service - in such cases NOFOLD may be useful to override this default for individual functions that are not suitable for constant folding.
NOFOLDSpecifies that the service is not suitable for constant folding.
ACTIONIndicates the function has side effects and requires the optimizer to not remove calls to the function.
CONTEXTInternal use, only. Indicates an extra internal context parameter (ICodeContext *) is passed to the function. This must be the first function parameter.
GLOBALCONTEXTInternal use, only. Same as CONTEXT, but there are restrictions on where the function can be used (for example, not in a TRANSFORM).
CTXMETHODInternal use, only. Indicates the function is actually a method of the internal code context.