Package org.evomaster.client.java.sql
Class QueryResultSet
java.lang.Object
org.evomaster.client.java.sql.QueryResultSet
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 Summary
ConstructorsConstructorDescriptionCreates a QueryResult set with default case sensitivity (case-insensitive). -
Method Summary
Modifier and TypeMethodDescriptionvoidaddQueryResult(QueryResult queryResult) Adds a query result to the result set.static QueryResultSetbuild(QueryResult... data) getQueryResultForNamedTable(String tableName) Retrieves the query result associated with a named table.
-
Constructor Details
-
QueryResultSet
public QueryResultSet()Creates a QueryResult set with default case sensitivity (case-insensitive).
-
-
Method Details
-
build
-
addQueryResult
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
Retrieves the query result associated with a named table.- Parameters:
tableName- the name of the table- Returns:
- the query result for the table, or
nullif no result exists
-