Module com.darkcollective.relix.ast
Package com.darkcollective.relix.ast
Record Class WindowFrame.Between
java.lang.Object
java.lang.Record
com.darkcollective.relix.ast.WindowFrame.Between
- Record Components:
unit- whether offsets count rows or measure the sort key; never nullstart- where the frame begins; neverUNBOUNDED FOLLOWINGend- where it ends; neverUNBOUNDED PRECEDING, nor before the start
- All Implemented Interfaces:
WindowFrame
- Enclosing interface:
WindowFrame
public static record WindowFrame.Between(WindowFrame.Unit unit, WindowFrame.Bound start, WindowFrame.Bound end)
extends Record
implements WindowFrame
SQL's frame clause,
ROWS | RANGE BETWEEN start AND end.
In WindowFrame.Unit.ROWS an offset counts rows: 2 PRECEDING is two rows
before the current one. In WindowFrame.Unit.RANGE it is measured along the single sort
key: 7 PRECEDING reaches every row whose key is within seven of the
current row's, and CURRENT ROW includes the current row's peers — every
row with an equal key. A RANGE offset is a number for a NUMBER key or a
DURATION for a date or timestamp key.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.darkcollective.relix.ast.WindowFrame
WindowFrame.Between, WindowFrame.Bound, WindowFrame.BoundedFrame, WindowFrame.CumulativeFrame, WindowFrame.PartitionFrame, WindowFrame.Unit -
Constructor Summary
ConstructorsConstructorDescriptionBetween(WindowFrame.Unit unit, WindowFrame.Bound start, WindowFrame.Bound end) Creates an instance of aBetweenrecord class. -
Method Summary
Modifier and TypeMethodDescriptionend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanWhether either end is an offset measured along the sort key.start()Returns the value of thestartrecord component.toString()Returns a string representation of this record class.unit()Returns the value of theunitrecord component.
-
Constructor Details
-
Method Details
-
measuresKey
public boolean measuresKey()Whether either end is an offset measured along the sort key. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
unit
Returns the value of theunitrecord component.- Returns:
- the value of the
unitrecord component
-
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-