Class IndexSet
java.lang.Object
io.ebeaninternal.dbmigration.ddlgeneration.platform.util.IndexSet
public class IndexSet extends Object
The indexes held on the table.
Used to detect when we don't need to add an index on the foreign key columns when there is an existing unique constraint with the same columns.
-
Constructor Summary
Constructors Constructor Description IndexSet() -
Method Summary
Modifier and Type Method Description voidadd(IndexColumns index)Add the externally created unique constraint here so that we check later if foreign key indexes don't need to be created (as the columns match this unique constraint).voidadd(String column)Add an index for the given column.booleanadd(String[] columns)Return true if an index should be added for the given columns.voidclear()Clear the indexes (for each table).booleancontains(String column)booleancontains(List<String> columns)List<IndexColumns>getIndexes()
-
Constructor Details
-
IndexSet
public IndexSet()
-
-
Method Details
-
clear
Clear the indexes (for each table). -
add
Add an index for the given column. -
add
Return true if an index should be added for the given columns.Returning false indicates there is an existing index (unique constraint) with these columns and that an extra index should not be added.
-
add
Add the externally created unique constraint here so that we check later if foreign key indexes don't need to be created (as the columns match this unique constraint). -
contains
-
contains
-
getIndexes
-