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

public final Class BooleanTest

extends SimplePredicate
Class Inheritance
Imports
java.util.List, org.h2.engine.SessionLocal, org.h2.expression.Expression, .ExpressionColumn, .TypedValueExpression, .ValueExpression, org.h2.index.IndexCondition, org.h2.table.TableFilter, org.h2.value.Value, .ValueBoolean, .ValueNull

Boolean test (IS [NOT] { TRUE | FALSE | UNKNOWN }).

Field Summary

Modifier and TypeField and Description
private final Boolean
Inherited from org.h2.expression.condition.SimplePredicate:
leftnotwhenOperand

Constructor Summary

AccessConstructor and Description
public
BooleanTest(Expression left, boolean not, boolean whenOperand, Boolean right)

Method Summary

Modifier and TypeMethod and Description
public void
createIndexConditions(SessionLocal
the session
session
,
TableFilter
the table filter
filter
)

Overrides org.h2.expression.Expression.createIndexConditions.

Create index conditions if possible and attach them to the table filter.

public Expression
getNotIfPossible(SessionLocal
the session
session
)

Overrides org.h2.expression.Expression.getNotIfPossible.

If it is possible, return the negated expression.

public StringBuilder
getUnenclosedSQL(StringBuilder
string builder
builder
,
int
formatting flags
sqlFlags
)

Implements abstract org.h2.expression.Expression.getUnenclosedSQL.

Get the SQL statement of this expression.

public Value
getValue(SessionLocal
the session
session
)

Implements abstract org.h2.expression.Expression.getValue.

Return the resulting value for the current row.

private boolean
public StringBuilder
getWhenSQL(StringBuilder
string builder
builder
,
int
formatting flags
sqlFlags
)

Overrides org.h2.expression.Expression.getWhenSQL.

Appends the SQL statement of this when operand to the specified builder.

public boolean
getWhenValue(SessionLocal
the session
session
,
Value
value on the left side
left
)

Overrides org.h2.expression.Expression.getWhenValue.

Return the resulting value of when operand for the current row.

Inherited from org.h2.expression.condition.SimplePredicate:
getCostgetSubexpressiongetSubexpressionCountisEverythingisWhenConditionOperandmapColumnsneedParenthesesoptimizesetEvaluatableupdateAggregate

Field Detail

Constructor Detail

BooleanTestback to summary
public BooleanTest(Expression left, boolean not, boolean whenOperand, Boolean right)

Method Detail

createIndexConditionsback to summary
public void createIndexConditions(SessionLocal session, TableFilter filter)

Overrides org.h2.expression.Expression.createIndexConditions.

Doc from org.h2.expression.Expression.createIndexConditions.

Create index conditions if possible and attach them to the table filter.

Parameters
session:SessionLocal

the session

filter:TableFilter

the table filter

Annotations
@Override
getNotIfPossibleback to summary
public Expression getNotIfPossible(SessionLocal session)

Overrides org.h2.expression.Expression.getNotIfPossible.

Doc from org.h2.expression.Expression.getNotIfPossible.

If it is possible, return the negated expression. This is used to optimize NOT expressions: NOT ID>10 can be converted to ID<=10. Returns null if negating is not possible.

Parameters
session:SessionLocal

the session

Returns:Expression

the negated expression, or null

Annotations
@Override
getUnenclosedSQLback to summary
public StringBuilder getUnenclosedSQL(StringBuilder builder, int sqlFlags)

Implements abstract org.h2.expression.Expression.getUnenclosedSQL.

Doc from org.h2.expression.Expression.getUnenclosedSQL.

Get the SQL statement of this expression. This may not always be the original SQL statement, especially after optimization. Enclosing '(' and ')' are never appended.

Parameters
builder:StringBuilder

string builder

sqlFlags:int

formatting flags

Returns:StringBuilder

the specified string builder

Annotations
@Override
getValueback to summary
public Value getValue(SessionLocal session)

Implements abstract org.h2.expression.Expression.getValue.

Doc from org.h2.expression.Expression.getValue.

Return the resulting value for the current row.

Parameters
session:SessionLocal

the session

Returns:Value

the result

Annotations
@Override
getValueback to summary
private boolean getValue(Value left)
getWhenSQLback to summary
public StringBuilder getWhenSQL(StringBuilder builder, int sqlFlags)

Overrides org.h2.expression.Expression.getWhenSQL.

Doc from org.h2.expression.Expression.getWhenSQL.

Appends the SQL statement of this when operand to the specified builder.

Parameters
builder:StringBuilder

string builder

sqlFlags:int

formatting flags

Returns:StringBuilder

the specified string builder

Annotations
@Override
getWhenValueback to summary
public boolean getWhenValue(SessionLocal session, Value left)

Overrides org.h2.expression.Expression.getWhenValue.

Doc from org.h2.expression.Expression.getWhenValue.

Return the resulting value of when operand for the current row.

Parameters
session:SessionLocal

the session

left:Value

value on the left side

Returns:boolean

the result

Annotations
@Override