Class QueryResultTransformer
java.lang.Object
org.evomaster.client.java.sql.internal.QueryResultTransformer
This class is used to covert InsertionDto to QueryResult and DataRow
in order to calculate sql heuristics based on InsertionDto
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncartesianProduct(List<List<T>> values) implement Cartesian Product e.g., (a,b) * (c,d) = (a,c), (a,d), (b,c), (b,d)static QueryResult[]convertInsertionDtosToQueryResults(List<InsertionDto> insertionDtos, Map<SqlTableId, Set<SqlColumnId>> columns, DbInfoDto schemaDto) static QueryResultSettranslateInsertionDtos(List<InsertionDto> insertionDtos, Map<SqlTableId, Set<SqlColumnId>> columns, DbInfoDto schema)
-
Constructor Details
-
QueryResultTransformer
public QueryResultTransformer()
-
-
Method Details
-
convertInsertionDtosToQueryResults
public static QueryResult[] convertInsertionDtosToQueryResults(List<InsertionDto> insertionDtos, Map<SqlTableId, Set<SqlColumnId>> columns, DbInfoDto schemaDto) - Parameters:
insertionDtos- specifies InsertionDto which indicates data we have been inserted into database or mockedcolumns- specifies WHERE clause using a map from table name to involved column namesschemaDto- specifies info about schema that is used to parse printable value specified in InsertionDto to Object value- Returns:
- extracted an array of QueryResult.
-
cartesianProduct
implement Cartesian Product e.g., (a,b) * (c,d) = (a,c), (a,d), (b,c), (b,d)- Type Parameters:
T- type of values- Parameters:
values- specified a list of sets for n-fold Cartesian Product- Returns:
- results of Cartesian Product of the given sets
-
translateInsertionDtos
public static QueryResultSet translateInsertionDtos(List<InsertionDto> insertionDtos, Map<SqlTableId, Set<SqlColumnId>> columns, DbInfoDto schema)
-