Class Condition

java.lang.Object
org.h2.expression.Expression
org.h2.expression.condition.Condition
All Implemented Interfaces:
HasSQL, Typed
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.
  • Constructor Details

    • Condition

      Condition()
  • Method Details

    • 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 session
      expression - 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 interface Typed
      Specified by:
      getType in class Expression
      Returns:
      the data type