Package org.h2.expression.condition
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 org.h2.expression.Expression
AUTO_PARENTHESES, MAP_IN_AGGREGATE, MAP_IN_WINDOW, MAP_INITIAL, WITH_PARENTHESES, WITHOUT_PARENTHESES
Fields inherited from interface org.h2.util.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 Expression
castToBoolean
(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 org.h2.expression.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, writeExpressions
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.h2.util.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:Expression
Returns the data type. The data type may be unknown before the optimization phase.- Specified by:
getType
in interfaceTyped
- Specified by:
getType
in classExpression
- Returns:
- the data type
-