Class DuplicatedIndexes

  • All Implemented Interfaces:
    TableNameAware

    public class DuplicatedIndexes
    extends java.lang.Object
    implements TableNameAware
    A representation of duplicated indexes in a database.

    A typical error is when you create a column with an UNIQUE CONSTRAINT and then manually create an unique index on it. See documentation https://www.postgresql.org/docs/10/ddl-constraints.html#DDL-CONSTRAINTS-UNIQUE-CONSTRAINTS.

    • Method Detail

      • getTableName

        @Nonnull
        public java.lang.String getTableName()
        Gets table name.
        Specified by:
        getTableName in interface TableNameAware
        Returns:
        table name
      • getDuplicatedIndexes

        @Nonnull
        public java.util.List<IndexWithSize> getDuplicatedIndexes()
      • getTotalSize

        public long getTotalSize()
      • getIndexNames

        public java.util.Set<java.lang.String> getIndexNames()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • of

        public static DuplicatedIndexes of​(@Nonnull
                                           java.lang.String tableName,
                                           @Nonnull
                                           java.lang.String duplicatedAsString)