Class DbInfoExtractor

java.lang.Object
org.evomaster.client.java.sql.DbInfoExtractor

public class DbInfoExtractor extends Object
  • Field Details

  • Constructor Details

    • DbInfoExtractor

      public DbInfoExtractor()
  • Method Details

    • validate

      public static boolean validate(DbInfoDto schema) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • extract

      public static DbInfoDto extract(Connection connection) throws Exception
      Throws:
      Exception
    • addUniqueConstraintToColumn

      public static void addUniqueConstraintToColumn(TableDto tableDto, String columnName)
      Adds a unique constraint to the corresponding ColumnDTO for the selected table.column pair. Requires the ColumnDTO to be contained in the TableDTO. If the column DTO is not contained, a IllegalArgumentException is thrown.
      Parameters:
      tableDto - the DTO of the table
      columnName - the name of the column to add the unique constraint on