Enum SqlNullSemantics

All Implemented Interfaces:
Serializable, Comparable<SqlNullSemantics>, Constable

public enum SqlNullSemantics extends Enum<SqlNullSemantics>
SqlNullSemantics defines the possible comparison rules for values which might be null. In SQL (and internal plans used to process SQL) different rules are used depending on the context.
  • Enum Constant Details


      public static final SqlNullSemantics NULL_MATCHES_NOTHING
      Predicate semantics: e.g. in the expression (WHERE X=5), if X is NULL, the comparison result is unknown, and so a filter used to evaluate the WHERE clause rejects the row.

      public static final SqlNullSemantics NULL_MATCHES_NULL
      GROUP BY key semantics: e.g. in the expression (GROUP BY A,B), the key (null,5) is treated as equal to another key (null,5).

      public static final SqlNullSemantics NULL_MATCHES_ANYTHING
      Wildcard semantics: logically, this is not present in any SQL construct. However, it is required internally, for example to rewrite NOT IN to NOT EXISTS; when we negate a predicate, we invert the null semantics, so NULL_MATCHES_NOTHING must become NULL_MATCHES_ANYTHING.
  • Method Details

    • values

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

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