Package com.arcadedb.function.sql
Class SQLFunctionDefinition
- java.lang.Object
-
- com.arcadedb.function.sql.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 Summary
Constructors Constructor Description SQLFunctionDefinition(Database database, String functionName, String implementation)
Creates the function with its name, implementation in form of text and optional parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
execute(Object... parameters)
Executes the function passing optional parameters.String
getName()
Returns the name of the function.
-
-
-
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 functionimplementation
- Implementation code as string
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:FunctionDefinition
Returns the name of the function.- Specified by:
getName
in interfaceFunctionDefinition
-
execute
public Object execute(Object... parameters)
Description copied from interface:FunctionDefinition
Executes the function passing optional parameters.- Specified by:
execute
in interfaceFunctionDefinition
- Parameters:
parameters
- are optional and can be positional or a map of key/value pairs.- Returns:
- The result of the function
-
-