Class AnalyticFunction
java.lang.Object
org.springframework.data.relational.core.sql.AnalyticFunction
- All Implemented Interfaces:
Expression, Segment, Visitable
Represents an analytic function, also known as windowing function
- Since:
- 2.7
- Author:
- Jens Schauder
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionas(SqlIdentifier alias) static AnalyticFunctioncreate(String function, Expression... arguments) booleaninthashCode()Generate a hash code from thisSegment.orderBy(Collection<? extends Expression> orderBy) Specify the ORDER BY clause of an analytic functionorderBy(Expression... orderBy) Specify the ORDER BY clause of an analytic functionorderBy(OrderByField... orderBy) Specify the ORDER BY clause of an analytic functionpartitionBy(Collection<? extends Expression> partitionBy) Specify the PARTITION BY clause of an analytic functionpartitionBy(Expression... partitionBy) Specify the PARTITION BY clause of an analytic functiontoString()Return a SQL string representation of thisSegment.void
-
Method Details
-
create
-
partitionBy
Specify the PARTITION BY clause of an analytic function- Parameters:
partitionBy- Typically, column but other expressions are fine to.- Returns:
- a new AnalyticFunction is partitioned by the given expressions, overwriting any expression previously present.
-
partitionBy
Specify the PARTITION BY clause of an analytic function- Parameters:
partitionBy- Typically, column but other expressions are fine to.- Returns:
- a new AnalyticFunction is partitioned by the given expressions, overwriting any expression previously present.
- Since:
- 4.0
-
orderBy
Specify the ORDER BY clause of an analytic function- Parameters:
orderBy- Typically, column but other expressions are fine to.- Returns:
- a new AnalyticFunction is ordered by the given expressions, overwriting any expression previously present.
-
orderBy
Specify the ORDER BY clause of an analytic function- Parameters:
orderBy- Typically, column but other expressions are fine to.- Returns:
- a new AnalyticFunction is ordered by the given expressions, overwriting any expression previously present.
- Since:
- 4.0
-
orderBy
Specify the ORDER BY clause of an analytic function- Parameters:
orderBy- array ofExpression. Typically, column but other expressions are fine to.- Returns:
- a new AnalyticFunction is ordered by the given expressions, overwriting any expression previously present.
-
as
-
as
-
visit
-
hashCode
public int hashCode()Description copied from interface:SegmentGenerate a hash code from thisSegment.Hashcode typically derives from the
Segment.toString()representation so twoSegments yield the sameSegment.hashCode()if theirSegment.toString()representation matches. -
equals
Description copied from interface:SegmentCheck whether thisSegmentis equal to anotherSegment.Equality is typically given if the
Segment.toString()representation matches. -
toString
Description copied from interface:SegmentReturn a SQL string representation of thisSegment.The representation is intended for debugging purposes and an approximation to the generated SQL. While it might work in the context of a specific dialect, you should not assume that the
Segment.toString()representation works across multiple databases.
-