Class Condition
java.lang.Object
org.h2.expression.Expression
org.h2.expression.condition.Condition
- Direct Known Subclasses:
BetweenPredicate, CompareLike, Comparison, ConditionAndOr, ConditionAndOrN, ConditionIn, ConditionInConstantSet, ConditionInParameter, ConditionLocalAndGlobal, ConditionNot, IsJsonPredicate, PredicateWithSubquery, SimplePredicate
Represents a condition returning a boolean value, or NULL.
-
Field Summary
Fields inherited from class Expression
AUTO_PARENTHESES, MAP_IN_AGGREGATE, MAP_IN_WINDOW, MAP_INITIAL, WITH_PARENTHESES, WITHOUT_PARENTHESESFields inherited from interface HasSQL
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static ExpressioncastToBoolean(SessionLocal session, Expression expression) Add a cast around the expression (if necessary) so that the type is boolean.getType()Returns the data type.Methods inherited from class Expression
addFilterConditions, createIndexConditions, getAlias, getBooleanValue, getColumnName, getColumnNameForView, getCost, getEnclosedSQL, getNonAliasExpression, getNotIfPossible, getNullable, getSchemaName, getSQL, getSQL, getSQL, getSQL, getSubexpression, getSubexpressionCount, getTableAlias, getTableName, getUnenclosedSQL, getValue, getWhenSQL, getWhenValue, isConstant, isEverything, isIdentity, isNullConstant, isValueSet, isWhenConditionOperand, mapColumns, needParentheses, optimize, optimizeCondition, setEvaluatable, toString, updateAggregate, writeExpressions, writeExpressionsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface HasSQL
getTraceSQL
-
Constructor Details
-
Condition
Condition()
-
-
Method Details
-
castToBoolean
Add a cast around the expression (if necessary) so that the type is boolean.- Parameters:
session- the sessionexpression- the expression- Returns:
- the new expression
-
getType
Description copied from class:ExpressionReturns the data type. The data type may be unknown before the optimization phase.- Specified by:
getTypein interfaceTyped- Specified by:
getTypein classExpression- Returns:
- the data type
-