Package org.evomaster.client.java.sql
Class QueryResult
java.lang.Object
org.evomaster.client.java.sql.QueryResult
The results of a SQL Select query, in a easy to parse/manipulate data structure
compared to java.sql.ResultSet.
-
Constructor Summary
ConstructorsConstructorDescriptionQueryResult(ResultSet resultSet) QueryResult(List<String> columnNames, String tableName) WARNING: Constructor only needed for testingQueryResult(List<VariableDescriptor> variableDescriptorList) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidRetrieves the table name of this queryResult.booleanisEmpty()limit(long limit) Creates a new QueryResult containing only the first 'limit' rows of the current QueryResult.booleansameVariableNames(List<String> columnNames, String tableName) booleansameVariableNames(DataRow row) seeRows()intsize()org.evomaster.client.java.controller.api.dto.database.operations.QueryResultDtotoDto()toString()
-
Constructor Details
-
QueryResult
-
QueryResult
WARNING: Constructor only needed for testing- Parameters:
columnNames- name of columnstableName- name of table the columns belongs to
-
QueryResult
-
-
Method Details
-
addRow
-
addRow
-
sameVariableNames
-
sameVariableNames
-
seeRows
-
seeVariableDescriptors
-
isEmpty
public boolean isEmpty() -
size
public int size() -
toString
-
toDto
public org.evomaster.client.java.controller.api.dto.database.operations.QueryResultDto toDto() -
getTableName
Retrieves the table name of this queryResult.- Returns:
- the table name of the first
VariableDescriptorin thevariableDescriptorslist. - Throws:
IllegalStateException- if thevariableDescriptorslist is empty.
-
limit
Creates a new QueryResult containing only the first 'limit' rows of the current QueryResult.- Parameters:
limit- the maximum number of rows to include in the new QueryResult- Returns:
- a new QueryResult with at most 'limit' rows
-