Package org.apache.calcite.sql.babel
Enum TableCollectionType
- All Implemented Interfaces:
Serializable,Comparable<TableCollectionType>,Constable
Enumerates the collection type of a table:
MULTISET allows duplicates
and SET does not.
This feature is supported in Teradata, which originally required rows in a
table to be unique, and later added the MULTISET keyword to
its CREATE TABLE command to allow the duplicate rows.
In other databases and in the SQL standard, MULTISET is the only
supported option, so there is no explicit syntax.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDuplicate rows are permitted, in compliance with the ANSI SQL:2011 standard.Duplicate rows are not permitted.Table collection type is not specified. -
Method Summary
Modifier and TypeMethodDescriptionstatic TableCollectionTypeReturns the enum constant of this type with the specified name.static TableCollectionType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNSPECIFIED
Table collection type is not specified.Defaults to
MULTISETin ANSI mode, andSETin Teradata mode. -
SET
Duplicate rows are not permitted. -
MULTISET
Duplicate rows are permitted, in compliance with the ANSI SQL:2011 standard.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-