Interface SQLCondition

All Superinterfaces:
SQLExpression, SQLOrderItem, SQLSelectItem

public interface SQLCondition extends SQLExpression
A boolean SQL expression that can also be projected or ordered when supported by a dialect. Conditions created with and(SQLCondition) and or(SQLCondition) retain their explicit tree structure; the compiler adds parentheses where needed. By contrast, connector calls in a fluent WHERE, HAVING, or JOIN ON clause follow SQL operator precedence, where AND binds more tightly than OR. Use complete composed conditions when a particular grouping is required. Comparisons to SQL NULL are not rewritten; use SQL.isNull(SQLExpression) or SQL.isNotNull(SQLExpression) for SQL NULL tests.
Since:
4.15
Author:
Eike Stepper
No Implement
This interface is not intended to be implemented by clients.
No Extend
This interface is not intended to be extended by clients.
  • Method Details

    • and

      default SQLCondition and(SQLCondition other)
      Combines this condition with another condition using AND.
      Parameters:
      other - the condition to combine
      Returns:
      the combined condition
    • or

      default SQLCondition or(SQLCondition other)
      Combines this condition with another condition using OR.
      Parameters:
      other - the condition to combine
      Returns:
      the combined condition
    • not

      default SQLCondition not()
      Negates this condition.
      Returns:
      the negated condition