Top Description Fields Constructors Methods
org.h2.expression.analysis

public Class WindowFrameBound

extends Object
Class Inheritance
Imports
org.h2.engine.SessionLocal, org.h2.expression.Expression, org.h2.table.ColumnResolver

Window frame bound.

Field Summary

Modifier and TypeField and Description
private int
private boolean
private final WindowFrameBoundType
private Expression

Constructor Summary

AccessConstructor and Description
public
WindowFrameBound(WindowFrameBoundType
bound type
type
,
Expression
bound value, if any
value
)

Creates new instance of window frame bound.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the index of preserved expression, or -1
getExpressionIndex
()

Returns the index of preserved expression.

public StringBuilder

Returns:

the specified string builder
getSQL
(StringBuilder
string builder
builder
,
boolean
if false return SQL for starting clause, if true return SQL for following clause
following
,
int
formatting flags
sqlFlags
)

Appends SQL representation to the specified builder.

public WindowFrameBoundType

Returns:

the type
getType
()

Returns the type

public Expression

Returns:

the value
getValue
()

Returns the value.

public boolean

Returns:

whether bound is defined as n PRECEDING or n FOLLOWING
isParameterized
()

Returns whether bound is defined as n PRECEDING or n FOLLOWING.

public boolean

Returns:

whether bound is defined with a variable
isVariable
()

Returns whether bound is defined with a variable.

pack-priv void
mapColumns(ColumnResolver
the column resolver
resolver
,
int
the subquery nesting level
level
,
int
current state for nesting checks
state
)

Map the columns of the resolver to expression columns.

pack-priv void
optimize(SessionLocal
the session
session
)

Try to optimize bound expression.

pack-priv void
setExpressionIndex(int
the index to set
expressionIndex
)

Sets the index of preserved expression.

pack-priv void
updateAggregate(SessionLocal
the session
session
,
int
select stage
stage
)

Update an aggregate value.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

expressionIndexback to summary
private int expressionIndex
isVariableback to summary
private boolean isVariable
typeback to summary
private final WindowFrameBoundType type
valueback to summary
private Expression value

Constructor Detail

WindowFrameBoundback to summary
public WindowFrameBound(WindowFrameBoundType type, Expression value)

Creates new instance of window frame bound.

Parameters
type:WindowFrameBoundType

bound type

value:Expression

bound value, if any

Method Detail

getExpressionIndexback to summary
public int getExpressionIndex()

Returns the index of preserved expression.

Returns:int

the index of preserved expression, or -1

getSQLback to summary
public StringBuilder getSQL(StringBuilder builder, boolean following, int sqlFlags)

Appends SQL representation to the specified builder.

Parameters
builder:StringBuilder

string builder

following:boolean

if false return SQL for starting clause, if true return SQL for following clause

sqlFlags:int

formatting flags

Returns:StringBuilder

the specified string builder

See Also
Expression#getSQL(StringBuilder, int, int)
getTypeback to summary
public WindowFrameBoundType getType()

Returns the type

Returns:WindowFrameBoundType

the type

getValueback to summary
public Expression getValue()

Returns the value.

Returns:Expression

the value

isParameterizedback to summary
public boolean isParameterized()

Returns whether bound is defined as n PRECEDING or n FOLLOWING.

Returns:boolean

whether bound is defined as n PRECEDING or n FOLLOWING

isVariableback to summary
public boolean isVariable()

Returns whether bound is defined with a variable. This method may be used only after optimize(SessionLocal) invocation.

Returns:boolean

whether bound is defined with a variable

mapColumnsback to summary
pack-priv void mapColumns(ColumnResolver resolver, int level, int state)

Map the columns of the resolver to expression columns.

Parameters
resolver:ColumnResolver

the column resolver

level:int

the subquery nesting level

state:int

current state for nesting checks

optimizeback to summary
pack-priv void optimize(SessionLocal session)

Try to optimize bound expression.

Parameters
session:SessionLocal

the session

setExpressionIndexback to summary
pack-priv void setExpressionIndex(int expressionIndex)

Sets the index of preserved expression.

Parameters
expressionIndex:int

the index to set

updateAggregateback to summary
pack-priv void updateAggregate(SessionLocal session, int stage)

Update an aggregate value.

Parameters
session:SessionLocal

the session

stage:int

select stage

See Also
Expression#updateAggregate(SessionLocal, int)