|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ScalarFunction
A scalar function. A scalar function can have any arity, including 0, and can also have dynamic arity. It must always produce a single value. The return type of such a function may depend on the number and types of its arguments but never on their values. An instance of a class that implements this interface can be used within a ScalarFunctionColumn.
| Method Summary | |
|---|---|
Value |
evaluate(java.util.List<Value> values)
Executes the scalar function on the given list of values, and returns the Value which is the result of the execution the function. |
java.lang.String |
getFunctionName()
Returns the function's name. |
ValueType |
getReturnType(java.util.List<ValueType> types)
Returns the return type of the function, given specific types for its parameters. |
java.lang.String |
toQueryString(java.util.List<java.lang.String> argumentQueryStrings)
Returns a string that when given to the query parser will yield a similar scalar function. |
void |
validateParameters(java.util.List<ValueType> types)
Validates that the number and types of the function parameters are valid. |
| Method Detail |
|---|
java.lang.String getFunctionName()
Value evaluate(java.util.List<Value> values)
values - The given list of parameter values for the scalar function.
ValueType getReturnType(java.util.List<ValueType> types)
types - A list of the types of the function's parameters.
void validateParameters(java.util.List<ValueType> types)
throws InvalidQueryException
types - The given types of the function's parameters.
InvalidQueryException - Thrown when the parameters are invalid.java.lang.String toQueryString(java.util.List<java.lang.String> argumentQueryStrings)
argumentQueryStrings - The query strings of the actual arguments.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||