Class ForeignKeysNotCoveredWithIndexCheckOnHost

java.lang.Object
io.github.mfvanek.pg.checks.host.ForeignKeysNotCoveredWithIndexCheckOnHost
All Implemented Interfaces:
DatabaseCheckOnHost<io.github.mfvanek.pg.model.constraint.ForeignKey>, DiagnosticAware, RawTypeAware<io.github.mfvanek.pg.model.constraint.ForeignKey>, io.github.mfvanek.pg.connection.HostAware

public class ForeignKeysNotCoveredWithIndexCheckOnHost extends Object
Check for foreign keys without associated indexes on a specific host.
Since:
0.6.0
  • Field Details

  • Constructor Details

    • ForeignKeysNotCoveredWithIndexCheckOnHost

      public ForeignKeysNotCoveredWithIndexCheckOnHost(@Nonnull io.github.mfvanek.pg.connection.PgConnection pgConnection)
  • Method Details

    • check

      @Nonnull public List<io.github.mfvanek.pg.model.constraint.ForeignKey> check(@Nonnull io.github.mfvanek.pg.model.PgContext pgContext)
      Returns foreign keys without associated indexes in the specified schema.
      Parameters:
      pgContext - check's context with the specified schema
      Returns:
      list of foreign keys without associated indexes
      See Also:
      • PgContext
    • getType

      @Nonnull public Class<io.github.mfvanek.pg.model.constraint.ForeignKey> getType()
      Gets original java type.
      Specified by:
      getType in interface RawTypeAware<T extends io.github.mfvanek.pg.model.DbObject>
      Returns:
      java type representing database object
    • getDiagnostic

      @Nonnull public Diagnostic getDiagnostic()
      Gets the diagnostic - a rule related to the check.
      Specified by:
      getDiagnostic in interface DiagnosticAware
      Returns:
      diagnostic
      See Also:
    • getHost

      @Nonnull public io.github.mfvanek.pg.connection.PgHost getHost()
      Specified by:
      getHost in interface io.github.mfvanek.pg.connection.HostAware
    • executeQuery

      @Nonnull protected List<io.github.mfvanek.pg.model.constraint.ForeignKey> executeQuery(@Nonnull io.github.mfvanek.pg.model.PgContext pgContext, @Nonnull ResultSetExtractor<io.github.mfvanek.pg.model.constraint.ForeignKey> rse)