public class CreateIndex extends MySqlPart
Generates a CREATE INDEX
statement for MySQL.
CREATE UNIQUE INDEX idx_firstname_lastname ON person (firstname, lastname);
Constructor and Description |
---|
CreateIndex() |
CreateIndex(String indexName,
String tableName,
String... columnNames) |
Modifier and Type | Method and Description |
---|---|
void |
collectSqlFragment(CodeWriter writer) |
List<String> |
getColumnNames() |
String |
getIndexName() |
String |
getTableName() |
boolean |
isUnique() |
CreateIndex |
setColumnNames(List<String> columnNames) |
CreateIndex |
setColumnNames(String... columnNames) |
CreateIndex |
setIndexName(String indexName) |
CreateIndex |
setPretty(boolean pretty) |
CreateIndex |
setTableName(String tableName) |
CreateIndex |
setUnique(boolean unique) |
escapeKeyword, placeBackTicks
collectParameterValues, getParameterValues, getSqlFragment, isPretty, printSqlParts, toString
public CreateIndex setPretty(boolean pretty)
public void collectSqlFragment(CodeWriter writer)
collectSqlFragment
in class SqlPart
public String getIndexName()
public CreateIndex setIndexName(String indexName)
public String getTableName()
public CreateIndex setTableName(String tableName)
public CreateIndex setColumnNames(List<String> columnNames)
public CreateIndex setColumnNames(String... columnNames)
public boolean isUnique()
public CreateIndex setUnique(boolean unique)
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.