Class AnalyticFunction
- java.lang.Object
-
- com.exasol.sql.expression.function.AbstractFunction
-
- com.exasol.sql.expression.function.exasol.AnalyticFunction
-
- All Implemented Interfaces:
Function,ValueExpression
public class AnalyticFunction extends AbstractFunction
This class represents an analytic function in the Exasol database that supports keywordsDISTINCTandALLand the over clause.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnalyticFunction.KeywordAnalytic function keywords
-
Field Summary
-
Fields inherited from class com.exasol.sql.expression.function.AbstractFunction
functionName, parameters
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(FunctionVisitor visitor)AcceptFunctionVisitor.AnalyticFunction.KeywordgetKeyword()Get the keyword for the function call, may benull.OverClausegetOverClause()Get the "over clause" appended to the function call, may benull.booleanhasParenthesis()Check if function needs parenthesis.AnalyticFunctionkeywordAll()Add keywordALLto the function callAnalyticFunctionkeywordDistinct()Add keywordDISTINCTto the function callstatic AnalyticFunctionof(ExasolAnalyticAggregateFunctions functionName, ValueExpression... valueExpressions)Create a newAnalyticFunctioninstance.AnalyticFunctionover(OverClause overClause)Add the given over clause to the function call.AnalyticFunctionover(UnaryOperator<OverClause> configurator)Add anOVERclause to the function call.-
Methods inherited from class com.exasol.sql.expression.function.AbstractFunction
accept, getFunctionName, getParameters
-
-
-
-
Method Detail
-
of
public static AnalyticFunction of(ExasolAnalyticAggregateFunctions functionName, ValueExpression... valueExpressions)
Create a newAnalyticFunctioninstance.- Parameters:
functionName- name of the functionvalueExpressions- zero or more value expressions- Returns:
- new
AnalyticFunction
-
keywordDistinct
public AnalyticFunction keywordDistinct()
Add keywordDISTINCTto the function call- Returns:
- this
AnalyticFunctionfor fluent programming
-
keywordAll
public AnalyticFunction keywordAll()
Add keywordALLto the function call- Returns:
- this
AnalyticFunctionfor fluent programming
-
getKeyword
public AnalyticFunction.Keyword getKeyword()
Get the keyword for the function call, may benull.- Returns:
- keyword for the function call
-
over
public AnalyticFunction over(OverClause overClause)
Add the given over clause to the function call.- Parameters:
overClause- over clause to add- Returns:
- this
AnalyticFunctionfor fluent programming
-
over
public AnalyticFunction over(UnaryOperator<OverClause> configurator)
Add anOVERclause to the function call. You configure the clause in the given lambda.- Parameters:
configurator- lambda configuring theOverClause.- Returns:
- this
AnalyticFunctionfor fluent programming
-
getOverClause
public OverClause getOverClause()
Get the "over clause" appended to the function call, may benull.- Returns:
- "over clause" appended to the function call
-
hasParenthesis
public boolean hasParenthesis()
Description copied from interface:FunctionCheck if function needs parenthesis.- Returns:
- true if function has parenthesis with parameters
-
accept
public void accept(FunctionVisitor visitor)
Description copied from interface:FunctionAcceptFunctionVisitor.- Parameters:
visitor- visitor to accept
-
-