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
abstract class Condition extends Expression
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 Constructor Description Condition()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static Expression
castToBoolean(SessionLocal session, Expression expression)
Add a cast around the expression (if necessary) so that the type is boolean.TypeInfo
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
-
-
-
-
Method Detail
-
castToBoolean
static Expression castToBoolean(SessionLocal session, Expression expression)
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
public TypeInfo 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
-
-