Class SqlHandler

java.lang.Object
org.evomaster.client.java.sql.internal.SqlHandler

public class SqlHandler extends Object
Class used to act upon SQL commands executed by the SUT
  • Constructor Details

  • Method Details

    • reset

      public void reset()
    • setConnection

      public void setConnection(Connection connection)
    • setSchema

      public void setSchema(DbInfoDto schema)
    • handle

      public void handle(SqlExecutionLogDto sqlExecutionLogDto)
      handle executed sql info
      Parameters:
      sqlExecutionLogDto - to be handled
    • getExecutionDto

      public SqlExecutionsDto getExecutionDto()
    • getSqlDistances

      public List<SqlCommandWithDistance> getSqlDistances(List<InsertionDto> successfulInitSqlInsertions, boolean queryFromDatabase)
      compute (SELECT, DELETE and UPDATE) sql distance for sql commands which exists in [buffer] Note that we skip `SELECT 1` (typically for testing sql connection) since its distance is 0
      Returns:
      a list of heuristics for sql commands
    • isCalculateHeuristics

      public boolean isCalculateHeuristics()
    • isExtractSqlExecution

      public boolean isExtractSqlExecution()
    • setCalculateHeuristics

      public void setCalculateHeuristics(boolean calculateHeuristics)
    • setExtractSqlExecution

      public void setExtractSqlExecution(boolean extractSqlExecution)
    • isCompleteSqlHeuristics

      public boolean isCompleteSqlHeuristics()
    • setCompleteSqlHeuristics

      public void setCompleteSqlHeuristics(boolean completeSqlHeuristics)