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
,ModeFunction
,NthValueFunction
,NtileFunction
,PercentileContFunction
,PercentileDiscFunction
,PercentRankFunction
,RankFunction
,RowNumberFunction
,SumFunction
,WindowEveryFunction
,WindowOrAggFunction
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
-
Field Summary
Modifier and TypeFieldDescriptionprotected final boolean
protected final String
protected final boolean
protected final boolean
protected final boolean
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractWindowFunction
(String functionName, boolean nullIsSmallest, boolean supportsNullPrecedence, boolean supportsFilterClause, boolean allowsFilterClause) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendEmulatedOrderByElementWithNulls
(FunctionRenderContext context, Order element) protected static String
protected static String
getCaseWhenPre
(List<String> filterExpressions) Class<?>
getReturnType
(Class<?> firstArgumentType) protected AbstractWindowFunction.WindowFunction
getWindowFunction
(FunctionRenderContext context) protected <T extends AbstractWindowFunction.WindowFunction>
TgetWindowFunction
(FunctionRenderContext context, T function, int startIndex) boolean
boolean
protected boolean
protected Enum<?>
processArgument
(Enum<?> mode, AbstractWindowFunction.WindowFunction windowFunction, String argument) final void
render
(FunctionRenderContext context) protected void
render
(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction) protected void
renderArgument
(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction, String caseWhenPre, String caseWhenPost, String argument, int argumentIndex) protected void
renderArguments
(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction) protected void
renderFilterExpressions
(FunctionRenderContext context, List<String> filterExpressions) protected void
renderFrame
(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction) protected void
renderFramePosition
(FunctionRenderContext context, WindowFramePositionType type, String frameExpression) protected void
renderFunction
(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction) protected void
renderOrder
(FunctionRenderContext context, Order order) protected void
renderOrderBy
(FunctionRenderContext context, List<Order> orderBys) protected void
renderPartitions
(FunctionRenderContext context, List<String> partitionExpressions) protected void
renderWithinGroup
(FunctionRenderContext context, List<Order> withinGroup) protected boolean
-
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:
hasArguments
in interfaceJpqlFunction
-
hasParenthesesIfNoArguments
public boolean hasParenthesesIfNoArguments()- Specified by:
hasParenthesesIfNoArguments
in interfaceJpqlFunction
-
getReturnType
- Specified by:
getReturnType
in interfaceJpqlFunction
-
render
- Specified by:
render
in 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) -
renderWithinGroup
-
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
-