Class WindowFrameBound
java.lang.Object
org.h2.expression.analysis.WindowFrameBound
Window frame bound.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate booleanprivate final WindowFrameBoundTypeprivate Expression -
Constructor Summary
ConstructorsConstructorDescriptionWindowFrameBound(WindowFrameBoundType type, Expression value) Creates new instance of window frame bound. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the index of preserved expression.getSQL(StringBuilder builder, boolean following, int sqlFlags) Appends SQL representation to the specified builder.getType()Returns the typegetValue()Returns the value.booleanReturns whether bound is defined as n PRECEDING or n FOLLOWING.booleanReturns whether bound is defined with a variable.(package private) voidmapColumns(ColumnResolver resolver, int level, int state) Map the columns of the resolver to expression columns.(package private) voidoptimize(SessionLocal session) Try to optimize bound expression.(package private) voidsetExpressionIndex(int expressionIndex) Sets the index of preserved expression.(package private) voidupdateAggregate(SessionLocal session, int stage) Update an aggregate value.
-
Field Details
-
type
-
value
-
isVariable
private boolean isVariable -
expressionIndex
private int expressionIndex
-
-
Constructor Details
-
WindowFrameBound
Creates new instance of window frame bound.- Parameters:
type- bound typevalue- bound value, if any
-
-
Method Details
-
getType
-
getValue
-
isParameterized
public boolean isParameterized()Returns whether bound is defined as n PRECEDING or n FOLLOWING.- Returns:
- whether bound is defined as n PRECEDING or n FOLLOWING
-
isVariable
public boolean isVariable()Returns whether bound is defined with a variable. This method may be used only afteroptimize(SessionLocal)invocation.- Returns:
- whether bound is defined with a variable
-
getExpressionIndex
public int getExpressionIndex()Returns the index of preserved expression.- Returns:
- the index of preserved expression, or -1
-
setExpressionIndex
void setExpressionIndex(int expressionIndex) Sets the index of preserved expression.- Parameters:
expressionIndex- the index to set
-
mapColumns
Map the columns of the resolver to expression columns.- Parameters:
resolver- the column resolverlevel- the subquery nesting levelstate- current state for nesting checks
-
optimize
Try to optimize bound expression.- Parameters:
session- the session
-
updateAggregate
Update an aggregate value.- Parameters:
session- the sessionstage- select stage- See Also:
-
getSQL
Appends SQL representation to the specified builder.- Parameters:
builder- string builderfollowing- if false return SQL for starting clause, if true return SQL for following clausesqlFlags- formatting flags- Returns:
- the specified string builder
- See Also:
-