Class QueryResultSet

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

public class QueryResultSet extends Object
Represents a collection of query results mapped to table names, with support for only base (physical) tables.

This class only allows a case-insensitive handling of table names and provides mechanisms to add, retrieve, and manage query results.

  • Constructor Details

    • QueryResultSet

      public QueryResultSet()
      Creates a QueryResult set with default case sensitivity (case-insensitive).
  • Method Details

    • build

      public static QueryResultSet build(QueryResult... data)
    • addQueryResult

      public void addQueryResult(QueryResult queryResult)
      Adds a query result to the result set.

      If the query result corresponds to a named table, it is stored in the map. If it corresponds to a virtual table, it is stored separately. Throws an exception if a duplicate table (named or virtual) is added.

      Parameters:
      queryResult - the query result to add
      Throws:
      IllegalArgumentException - if the table name already exists in the set
    • getQueryResultForNamedTable

      public QueryResult getQueryResultForNamedTable(String tableName)
      Retrieves the query result associated with a named table.
      Parameters:
      tableName - the name of the table
      Returns:
      the query result for the table, or null if no result exists