Class DbInfoExtractor

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

public class DbInfoExtractor extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addUniqueConstraintToColumn(org.evomaster.client.java.controller.api.dto.database.schema.TableDto tableDto, String columnName)
    Adds a unique constraint to the corresponding ColumnDTO for the selected table.column pair.
    static org.evomaster.client.java.controller.api.dto.database.schema.DbInfoDto
    extract(Connection connection)
     
    static boolean
    validate(org.evomaster.client.java.controller.api.dto.database.schema.DbInfoDto schema)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • DbInfoExtractor

      public DbInfoExtractor()
  • Method Details

    • validate

      public static boolean validate(org.evomaster.client.java.controller.api.dto.database.schema.DbInfoDto schema) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • extract

      public static org.evomaster.client.java.controller.api.dto.database.schema.DbInfoDto extract(Connection connection) throws Exception
      Throws:
      Exception
    • addUniqueConstraintToColumn

      public static void addUniqueConstraintToColumn(org.evomaster.client.java.controller.api.dto.database.schema.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