org.h2.engine

## Enum NullsDistinct

- java.lang.Object
- - java.lang.Enum<NullsDistinct>
  - - org.h2.engine.NullsDistinct

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<NullsDistinct>, HasSQL

    public enum NullsDistinct
    extends java.lang.Enum<NullsDistinct>
    implements HasSQL

Determines how rows with `NULL` values in indexed columns are handled in unique indexes, unique constraints, or by unique predicate.

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`ALL_DISTINCT` `NULL` values of columns are distinct only if all columns have null values.
`DISTINCT` `NULL` values of columns are distinct.
`NOT_DISTINCT` `NULL` values of columns are never distinct.

### Field Summary

### Fields inherited from interface org.h2.util.HasSQL

`ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`java.lang.StringBuilder` `getSQL(java.lang.StringBuilder builder, int sqlFlags)` Appends the SQL statement of this object to the specified builder.
`static NullsDistinct` `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static NullsDistinct[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.h2.util.HasSQL

`getSQL, getTraceSQL`

### Enum Constant Detail

#### 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 Detail

#### values

    public static NullsDistinct[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (NullsDistinct c : NullsDistinct.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static NullsDistinct valueOf(java.lang.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.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
  `java.lang.NullPointerException` - if the argument is null

#### getSQL

    public java.lang.StringBuilder getSQL(java.lang.StringBuilder builder,
                                          int sqlFlags)

Description copied from interface: `HasSQL`
Appends the SQL statement of this object to the specified builder.

Specified by:
  `getSQL` in interface `HasSQL`
Parameters:
  `builder` - string builder
  `sqlFlags` - formatting flags
Returns:
  the specified string builder