Class Predicates

java.lang.Object
io.github.torand.fastersql.predicate.Predicates

public final class Predicates extends Object
Provides factory methods for predicates.
  • Method Details

    • in

      public static In in(LeftOperand left, Collection<?> right)
      Create a 'member of set' predicate taking a collection of scalar values as right operand.
      Parameters:
      left - the left operand.
      right - the right operand (scalar value collection).
      Returns:
      the predicate.
    • in

      public static InSubquery in(LeftOperand left, ExpressionSubquery right)
      Create a 'member of set' predicate taking a subquery as right operand.
      Parameters:
      left - the left operand.
      right - the right operand (subquery).
      Returns:
      the predicate.
    • exists

      public static ExistsSubquery exists(ExpressionSubquery operand)
      Create an 'existence' (at least one row) predicate taking a subquery as right operand.
      Parameters:
      operand - the operand (subquery).
      Returns:
      the predicate.
    • like

      public static Like like(LeftOperand left, String right)
      Creates a pattern matching predicate.
      Parameters:
      left - the left operand.
      right - the right operand (pattern).
      Returns:
      the predicate.
    • isNull

      public static IsNull isNull(LeftOperand operand)
      Creates an 'is null' predicate.
      Parameters:
      operand - the operand.
      Returns:
      the predicate.