Class ComparisonCondition

java.lang.Object
org.tentackle.dbms.dsl.ComparisonCondition
All Implemented Interfaces:
Condition, SqlElement

public class ComparisonCondition extends Object implements Condition
Two expressions compared by an Operator.

Expressions spanning more than one column are compared column by column, which is applicable to equality only (see Operator.isMultiColumnApplicable()).

Author:
harald
  • Constructor Details

    • ComparisonCondition

      public ComparisonCondition(Expression<?> leftExpression, Operator operator, Expression<?> rightExpression)
      Creates a comparison.
      Parameters:
      leftExpression - the left expression
      operator - the comparison operator
      rightExpression - the right expression
  • Method Details

    • getLeftExpression

      public Expression<?> getLeftExpression()
      Gets the left expression.
      Returns:
      the expression
    • getOperator

      public Operator getOperator()
      Gets the comparison operator.
      Returns:
      the operator
    • getRightExpression

      public Expression<?> getRightExpression()
      Gets the right expression.
      Returns:
      the expression
    • render

      public void render(RenderContext context)
      Description copied from interface: SqlElement
      Renders this element into the given context.
      Specified by:
      render in interface SqlElement
      Parameters:
      context - the render context