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 keywordsDISTINCT
andALL
and the over clause.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AnalyticFunction.Keyword
Analytic 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 void
accept(FunctionVisitor visitor)
AcceptFunctionVisitor
.AnalyticFunction.Keyword
getKeyword()
Get the keyword for the function call, may benull
.OverClause
getOverClause()
Get the "over clause" appended to the function call, may benull
.boolean
hasParenthesis()
Check if function needs parenthesis.AnalyticFunction
keywordAll()
Add keywordALL
to the function callAnalyticFunction
keywordDistinct()
Add keywordDISTINCT
to the function callstatic AnalyticFunction
of(ExasolAnalyticAggregateFunctions functionName, ValueExpression... valueExpressions)
Create a newAnalyticFunction
instance.AnalyticFunction
over(OverClause overClause)
Add the given over clause to the function call.AnalyticFunction
over(UnaryOperator<OverClause> configurator)
Add anOVER
clause 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 newAnalyticFunction
instance.- Parameters:
functionName
- name of the functionvalueExpressions
- zero or more value expressions- Returns:
- new
AnalyticFunction
-
keywordDistinct
public AnalyticFunction keywordDistinct()
Add keywordDISTINCT
to the function call- Returns:
- this
AnalyticFunction
for fluent programming
-
keywordAll
public AnalyticFunction keywordAll()
Add keywordALL
to the function call- Returns:
- this
AnalyticFunction
for 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
AnalyticFunction
for fluent programming
-
over
public AnalyticFunction over(UnaryOperator<OverClause> configurator)
Add anOVER
clause to the function call. You configure the clause in the given lambda.- Parameters:
configurator
- lambda configuring theOverClause
.- Returns:
- this
AnalyticFunction
for 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:Function
Check if function needs parenthesis.- Returns:
- true if function has parenthesis with parameters
-
accept
public void accept(FunctionVisitor visitor)
Description copied from interface:Function
AcceptFunctionVisitor
.- Parameters:
visitor
- visitor to accept
-
-