public enum ColumnType extends Enum<ColumnType>
| Enum Constant and Description |
|---|
INDEXED
Indexes are special lookup tables that the database search engine can use
to speed up data retrieval.
|
PRIMARY_KEY |
STANDARD |
UNIQUE |
| Modifier and Type | Method and Description |
|---|---|
static ColumnType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ColumnType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ColumnType PRIMARY_KEY
public static final ColumnType UNIQUE
public static final ColumnType STANDARD
public static final ColumnType INDEXED
Indexes are special lookup tables that the database search engine can use to speed up data retrieval. Simply put, an index is a pointer to data in a table. An index in a database is very similar to an index in the back of a book.
For example, if you want to reference all pages in a book that discuss a certain topic, you first refer to the index, which lists all topics alphabetically and are then referred to one or more specific page numbers.
An index helps speed up SELECT queries and WHERE clauses, but it slows down data input, with UPDATE and INSERT statements. Indexes can be created or dropped with no effect on the data.
Creating an index involves the CREATE INDEX statement, which allows you to name the index, to specify the table and which column or columns to index, and to indicate whether the index is in ascending or descending order.
Indexes can also be unique, similar to the UNIQUE constraint, in that the index prevents duplicate entries in the column or combination of columns on which there's an index.
See here for full documentation.
public static ColumnType[] values()
for (ColumnType c : ColumnType.values()) System.out.println(c);
public static ColumnType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2018. All rights reserved.