Class AbstractWindowFunction
java.lang.Object
com.blazebit.persistence.impl.function.window.AbstractWindowFunction
- All Implemented Interfaces:
JpqlFunction
- Direct Known Subclasses:
AbstractGroupConcatWindowFunction,AvgFunction,CountFunction,CumeDistFunction,DenseRankFunction,FirstValueFunction,LagFunction,LastValueFunction,LeadFunction,MaxFunction,MinFunction,NthValueFunction,NtileFunction,PercentRankFunction,RankFunction,RowNumberFunction,SumFunction,WindowEveryFunction,WindowOrAggFunction
public abstract class AbstractWindowFunction extends Object implements JpqlFunction
See the following for details: https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS
- Since:
- 1.4.0
- Author:
- Jan-Willem Gmelig Meyling, Sayra Ranjha
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractWindowFunction.WindowFunction -
Field Summary
Fields Modifier and Type Field Description protected booleanallowsFilterClauseprotected StringfunctionNameprotected booleannullIsSmallestprotected booleansupportsFilterClauseprotected booleansupportsNullPrecedence -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractWindowFunction(String functionName, boolean nullIsSmallest, boolean supportsNullPrecedence, boolean supportsFilterClause, boolean allowsFilterClause) -
Method Summary
-
Field Details
-
functionName
-
nullIsSmallest
protected final boolean nullIsSmallest -
supportsNullPrecedence
protected final boolean supportsNullPrecedence -
supportsFilterClause
protected final boolean supportsFilterClause -
allowsFilterClause
protected final boolean allowsFilterClause
-
-
Constructor Details
-
AbstractWindowFunction
protected AbstractWindowFunction(String functionName, boolean nullIsSmallest, boolean supportsNullPrecedence, boolean supportsFilterClause, boolean allowsFilterClause)
-
-
Method Details
-
hasArguments
public boolean hasArguments()- Specified by:
hasArgumentsin interfaceJpqlFunction
-
hasParenthesesIfNoArguments
public boolean hasParenthesesIfNoArguments()- Specified by:
hasParenthesesIfNoArgumentsin interfaceJpqlFunction
-
getReturnType
- Specified by:
getReturnTypein interfaceJpqlFunction
-
render
- Specified by:
renderin interfaceJpqlFunction
-
getWindowFunction
-
getWindowFunction
protected <T extends AbstractWindowFunction.WindowFunction> T getWindowFunction(FunctionRenderContext context, T function, int startIndex) -
processArgument
protected Enum<?> processArgument(Enum<?> mode, AbstractWindowFunction.WindowFunction windowFunction, String argument) -
requiresOver
protected boolean requiresOver() -
render
protected void render(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction) -
renderFunction
protected void renderFunction(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction) -
renderArguments
protected void renderArguments(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction) -
getCaseWhenPre
-
getCaseWhenPost
-
renderArgument
protected void renderArgument(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction, String caseWhenPre, String caseWhenPost, String argument, int argumentIndex) -
renderFilterExpressions
protected void renderFilterExpressions(FunctionRenderContext context, List<String> filterExpressions) -
renderPartitions
-
renderOrderBy
-
renderOrder
-
renderFrame
protected void renderFrame(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction) -
renderFramePosition
protected void renderFramePosition(FunctionRenderContext context, WindowFramePositionType type, String frameExpression) -
optimizeNullPrecedence
protected boolean optimizeNullPrecedence() -
appendEmulatedOrderByElementWithNulls
-