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 Details

  • Method Details

    • clear

      public void clear()
      Clear the indexes (for each table).
    • add

      public void add(String column)
      Add an index for the given column.
    • add

      public boolean add(String[] columns)
      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

      public void add(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).
    • contains

      public boolean contains(String column)
    • contains

      public boolean contains(List<String> columns)
    • getIndexes