public final class WindowFrame extends Object
| 构造器和说明 |
|---|
WindowFrame(WindowFrameUnits units,
WindowFrameBound starting,
WindowFrameBound following,
WindowFrameExclusion exclusion)
Creates new instance of window frame clause.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
getEndIndex(Window over,
SessionLocal session,
ArrayList<Value[]> orderedRows,
SortOrder sortOrder,
int currentRow)
Returns end index for the specified frame, or default end index if frame
is null.
|
WindowFrameExclusion |
getExclusion()
Returns the exclusion clause.
|
WindowFrameBound |
getFollowing()
Returns the following clause.
|
StringBuilder |
getSQL(StringBuilder builder,
int formattingFlags)
Append SQL representation to the specified builder.
|
int |
getStartIndex(SessionLocal session,
ArrayList<Value[]> orderedRows,
SortOrder sortOrder,
int currentRow)
Returns start index of this frame,
|
WindowFrameBound |
getStarting()
Returns the starting clause.
|
WindowFrameUnits |
getUnits()
Returns the units.
|
boolean |
isValid()
Checks validity of this frame.
|
boolean |
isVariableBounds()
Check if bounds of this frame has variable expressions.
|
Iterator<Value[]> |
iterator(SessionLocal session,
ArrayList<Value[]> orderedRows,
SortOrder sortOrder,
int currentRow,
boolean reverse)
Returns iterator.
|
static Iterator<Value[]> |
iterator(Window over,
SessionLocal session,
ArrayList<Value[]> orderedRows,
SortOrder sortOrder,
int currentRow,
boolean reverse)
Returns iterator for the specified frame, or default iterator if frame is
null.
|
public WindowFrame(WindowFrameUnits units, WindowFrameBound starting, WindowFrameBound following, WindowFrameExclusion exclusion)
units - unitsstarting - starting clausefollowing - following clauseexclusion - exclusion clausepublic static Iterator<Value[]> iterator(Window over, SessionLocal session, ArrayList<Value[]> orderedRows, SortOrder sortOrder, int currentRow, boolean reverse)
over - windowsession - the sessionorderedRows - ordered rowssortOrder - sort ordercurrentRow - index of the current rowreverse - whether iterator should iterate in reverse orderpublic static int getEndIndex(Window over, SessionLocal session, ArrayList<Value[]> orderedRows, SortOrder sortOrder, int currentRow)
over - windowsession - the sessionorderedRows - ordered rowssortOrder - sort ordercurrentRow - index of the current rowUnsupportedOperationException - if over is not null and its exclusion clause is not EXCLUDE
NO OTHERSpublic WindowFrameUnits getUnits()
public WindowFrameBound getStarting()
public WindowFrameBound getFollowing()
public WindowFrameExclusion getExclusion()
public boolean isValid()
public boolean isVariableBounds()
optimize(SessionLocal) invocation.public Iterator<Value[]> iterator(SessionLocal session, ArrayList<Value[]> orderedRows, SortOrder sortOrder, int currentRow, boolean reverse)
session - the sessionorderedRows - ordered rowssortOrder - sort ordercurrentRow - index of the current rowreverse - whether iterator should iterate in reverse orderpublic int getStartIndex(SessionLocal session, ArrayList<Value[]> orderedRows, SortOrder sortOrder, int currentRow)
session - the sessionorderedRows - ordered rowssortOrder - sort ordercurrentRow - index of the current rowUnsupportedOperationException - if exclusion clause is not EXCLUDE NO OTHERSpublic StringBuilder getSQL(StringBuilder builder, int formattingFlags)
builder - string builderformattingFlags - quote all identifiersExpression.getSQL(StringBuilder, int, int)Copyright © 2022. All rights reserved.