public interface SQLFunction
extends com.holonplatform.core.Expression
Expression which represents a SQL function.| Modifier and Type | Method and Description |
|---|---|
static SQLFunction |
create(Function<List<String>,String> function)
Create a
SQLFunction using given function as serialization logic. |
static SQLFunction |
create(String name)
Create a default
SQLFunction. |
static SQLFunction |
create(String name,
boolean parenthesesIfNoArguments)
Create a default
SQLFunction. |
static SQLFunction |
extract(String partName)
Create an
EXTRACT function, which will be serialized this way:
EXTRACT(partName FROM argument). |
String |
serialize(List<String> arguments)
Serialize the function as SQL.
|
default String |
serialize(String... arguments)
Serialize the function as SQL.
|
String serialize(List<String> arguments) throws com.holonplatform.core.Expression.InvalidExpressionException
arguments - Optional function argumentsInvalidExpressionException - If the function arguments are not validcom.holonplatform.core.Expression.InvalidExpressionExceptiondefault String serialize(String... arguments)
arguments - Function argumentsstatic SQLFunction create(Function<List<String>,String> function)
SQLFunction using given function as serialization logic.function - Callback function (not null)SQLFunction using given function for serializationstatic SQLFunction create(String name, boolean parenthesesIfNoArguments)
SQLFunction.name - Function name (not null)parenthesesIfNoArguments - Whether parentheses are required if there are no argumentsSQLFunction with given namestatic SQLFunction create(String name)
SQLFunction. With this builder, parentheses are not added if there are no arguments.name - Function name (not null)SQLFunction with given namestatic SQLFunction extract(String partName)
EXTRACT function, which will be serialized this way:
EXTRACT(partName FROM argument).partName - The EXTRACT function part nameEXTRACT SQLFunctionCopyright © 2019 The Holon Platform. All rights reserved.