Package org.h2.engine

Enum Class NullsDistinct

java.lang.Object
java.lang.Enum<NullsDistinct>
org.h2.engine.NullsDistinct
All Implemented Interfaces:
Serializable, Comparable<NullsDistinct>, Constable, org.h2.util.HasSQL

public enum NullsDistinct extends Enum<NullsDistinct> implements org.h2.util.HasSQL
Determines how rows with NULL values in indexed columns are handled in unique indexes, unique constraints, or by unique predicate.
  • Enum Constant Details

    • DISTINCT

      public static final NullsDistinct DISTINCT
      NULL values of columns are distinct.
    • ALL_DISTINCT

      public static final NullsDistinct ALL_DISTINCT
      NULL values of columns are distinct only if all columns have null values.
    • NOT_DISTINCT

      public static final NullsDistinct NOT_DISTINCT
      NULL values of columns are never distinct.
  • Method Details

    • values

      public static NullsDistinct[] 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 NullsDistinct 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
    • getSQL

      public StringBuilder getSQL(StringBuilder builder, int sqlFlags)
      Description copied from interface: org.h2.util.HasSQL
      Appends the SQL statement of this object to the specified builder.
      Specified by:
      getSQL in interface org.h2.util.HasSQL
      Parameters:
      builder - string builder
      sqlFlags - formatting flags
      Returns:
      the specified string builder