Class SQLFunctionDefinition

  • All Implemented Interfaces:
    FunctionDefinition

    public class SQLFunctionDefinition
    extends Object
    implements FunctionDefinition
    Javascript implementation of a function. To define the function, pass the function name, code and optional parameters in the constructor.
    Author:
    Luca Garulli ([email protected])
    • Constructor Detail

      • SQLFunctionDefinition

        public SQLFunctionDefinition​(Database database,
                                     String functionName,
                                     String implementation)
        Creates the function with its name, implementation in form of text and optional parameters.
        Parameters:
        functionName - Name of the function
        implementation - Implementation code as string
    • Method Detail

      • execute

        public Object execute​(Object... parameters)
        Description copied from interface: FunctionDefinition
        Executes the function passing optional parameters.
        Specified by:
        execute in interface FunctionDefinition
        Parameters:
        parameters - are optional and can be positional or a map of key/value pairs.
        Returns:
        The result of the function