Class ColumnsWithSerialTypesCheckOnHost

java.lang.Object
io.github.mfvanek.pg.checks.host.ColumnsWithSerialTypesCheckOnHost
All Implemented Interfaces:
DatabaseCheckOnHost<io.github.mfvanek.pg.model.column.ColumnWithSerialType>, DiagnosticAware, RawTypeAware<io.github.mfvanek.pg.model.column.ColumnWithSerialType>, io.github.mfvanek.pg.connection.HostAware

public class ColumnsWithSerialTypesCheckOnHost extends Object
Check for columns of serial types that are not primary keys on a specific host.
Since:
0.6.2
  • Field Details

  • Constructor Details

    • ColumnsWithSerialTypesCheckOnHost

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

    • check

      @Nonnull public List<io.github.mfvanek.pg.model.column.ColumnWithSerialType> check(@Nonnull io.github.mfvanek.pg.model.PgContext pgContext)
      Returns columns with serial types that are not primary keys in the specified schema.
      Parameters:
      pgContext - check's context with the specified schema
      Returns:
      list of columns with serial types that are not primary keys
      See Also:
      • PgContext
    • getType

      @Nonnull public Class<io.github.mfvanek.pg.model.column.ColumnWithSerialType> 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.column.ColumnWithSerialType> executeQuery(@Nonnull io.github.mfvanek.pg.model.PgContext pgContext, @Nonnull ResultSetExtractor<io.github.mfvanek.pg.model.column.ColumnWithSerialType> rse)