public class Indexes
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Indexes.IndexImpl
The user side implementation of the index.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_MYSQL_PRIMARY_KEY_NAME
MySQL does not support setting the name of the primary key, so the default name is used.
|
static Index[] |
EMPTY_INDEXES
An empty array of indexes.
|
Modifier and Type | Method and Description |
---|---|
static Index |
createMysqlPrimaryKey(java.lang.String[][] fieldNames)
To create a MySQL primary key, you need to use the default primary key name.
|
static Index |
of(Index.IndexType indexType,
java.lang.String name,
java.lang.String[][] fieldNames) |
static Index |
primary(java.lang.String name,
java.lang.String[][] fieldNames)
Create a primary index on columns.
|
static Index |
unique(java.lang.String name,
java.lang.String[][] fieldNames)
Create a unique index on columns.
|
public static final Index[] EMPTY_INDEXES
public static final java.lang.String DEFAULT_MYSQL_PRIMARY_KEY_NAME
public static Index unique(java.lang.String name, java.lang.String[][] fieldNames)
name
- The name of the indexfieldNames
- The field names under the table contained in the index.public static Index createMysqlPrimaryKey(java.lang.String[][] fieldNames)
fieldNames
- The field names under the table contained in the index.public static Index primary(java.lang.String name, java.lang.String[][] fieldNames)
name
- The name of the indexfieldNames
- The field names under the table contained in the index.public static Index of(Index.IndexType indexType, java.lang.String name, java.lang.String[][] fieldNames)
indexType
- The type of the indexname
- The name of the indexfieldNames
- The field names under the table contained in the index.