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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final Stringprotected final booleanprotected final booleanprotected final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractWindowFunction(String functionName, boolean nullIsSmallest, boolean supportsNullPrecedence, boolean supportsFilterClause, boolean allowsFilterClause) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendEmulatedOrderByElementWithNulls(FunctionRenderContext context, Order element) protected static Stringprotected static StringgetCaseWhenPre(List<String> filterExpressions) Class<?>getReturnType(Class<?> firstArgumentType) protected AbstractWindowFunction.WindowFunctiongetWindowFunction(FunctionRenderContext context) protected <T extends AbstractWindowFunction.WindowFunction>
TgetWindowFunction(FunctionRenderContext context, T function, int startIndex) booleanbooleanprotected booleanprotected Enum<?>processArgument(Enum<?> mode, AbstractWindowFunction.WindowFunction windowFunction, String argument) final voidrender(FunctionRenderContext context) protected voidrender(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction) protected voidrenderArgument(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction, String caseWhenPre, String caseWhenPost, String argument, int argumentIndex) protected voidrenderArguments(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction) protected voidrenderFilterExpressions(FunctionRenderContext context, List<String> filterExpressions) protected voidrenderFrame(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction) protected voidrenderFramePosition(FunctionRenderContext context, WindowFramePositionType type, String frameExpression) protected voidrenderFunction(FunctionRenderContext context, AbstractWindowFunction.WindowFunction windowFunction) protected voidrenderOrder(FunctionRenderContext context, Order order) protected voidrenderOrderBy(FunctionRenderContext context, List<Order> orderBys) protected voidrenderPartitions(FunctionRenderContext context, List<String> partitionExpressions) protected voidrenderWithinGroup(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:
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) -
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
-