Enum Class SetOperator

java.lang.Object
java.lang.Enum<SetOperator>
io.github.torand.fastersql.setoperation.SetOperator
All Implemented Interfaces:
Serializable, Comparable<SetOperator>, Constable

public enum SetOperator extends Enum<SetOperator>
Defines operators for set operations.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    For two query blocks A and B, return all results from A which are not also present in B, omitting any duplicates (unless ALL is specified).
    Combine only those rows which the results of two query blocks have in common, omitting any duplicates (unless ALL is specified).
    Combine all results from two query blocks into a single result, omitting any duplicates (unless ALL is specified).
  • Method Summary

    Modifier and Type
    Method
    Description
    sql()
    Formats set operator as an SQL fragment.
    Returns the enum constant of this class with the specified name.
    static SetOperator[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • UNION

      public static final SetOperator UNION
      Combine all results from two query blocks into a single result, omitting any duplicates (unless ALL is specified).
    • INTERSECT

      public static final SetOperator INTERSECT
      Combine only those rows which the results of two query blocks have in common, omitting any duplicates (unless ALL is specified). Note that INTERSECT has precedence over UNION and EXCEPT.
    • EXCEPT

      public static final SetOperator EXCEPT
      For two query blocks A and B, return all results from A which are not also present in B, omitting any duplicates (unless ALL is specified).
  • Method Details

    • values

      public static SetOperator[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SetOperator valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • sql

      public String sql()
      Formats set operator as an SQL fragment.
      Returns:
      the formatted SQL fragment.