Package 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>,org.h2.util.HasSQL
public enum NullsDistinct extends java.lang.Enum<NullsDistinct> implements org.h2.util.HasSQL
Determines how rows withNULLvalues in indexed columns are handled in unique indexes, unique constraints, or by unique predicate.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALL_DISTINCTNULLvalues of columns are distinct only if all columns have null values.DISTINCTNULLvalues of columns are distinct.NOT_DISTINCTNULLvalues of columns are never distinct.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuildergetSQL(java.lang.StringBuilder builder, int sqlFlags)Appends the SQL statement of this object to the specified builder.static NullsDistinctvalueOf(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.
-
-
-
Enum Constant Detail
-
DISTINCT
public static final NullsDistinct DISTINCT
NULLvalues of columns are distinct.
-
ALL_DISTINCT
public static final NullsDistinct ALL_DISTINCT
NULLvalues of columns are distinct only if all columns have null values.
-
NOT_DISTINCT
public static final NullsDistinct NOT_DISTINCT
NULLvalues 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 namejava.lang.NullPointerException- if the argument is null
-
getSQL
public java.lang.StringBuilder getSQL(java.lang.StringBuilder builder, int sqlFlags)Description copied from interface:org.h2.util.HasSQLAppends the SQL statement of this object to the specified builder.- Specified by:
getSQLin interfaceorg.h2.util.HasSQL- Parameters:
builder- string buildersqlFlags- formatting flags- Returns:
- the specified string builder
-
-