Class SelectTransformer
- java.lang.Object
-
- org.evomaster.client.java.controller.internal.db.SelectTransformer
-
public class SelectTransformer extends Object
-
-
Constructor Summary
Constructors Constructor Description SelectTransformer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringaddFieldsToSelect(String select)The constraints in the WHERE clause might reference fields that are not retrieved in the SELECT.static StringremoveConstraints(String select)static StringremoveOperations(String select)For example, when we have "select count(*)" we are not interested in the count, but the actual involved fields, so we want to transform it into "select *" by removing the count() operation.
-
-
-
Method Detail
-
addFieldsToSelect
public static String addFieldsToSelect(String select)
The constraints in the WHERE clause might reference fields that are not retrieved in the SELECT. Therefore, we need to add them, otherwise it would not be possible to calculate any heuristics- Parameters:
select- the string containing the SQL SELECT command- Returns:
- the modified SQL SELECT
-
removeOperations
public static String removeOperations(String select)
For example, when we have "select count(*)" we are not interested in the count, but the actual involved fields, so we want to transform it into "select *" by removing the count() operation.- Parameters:
select- SQL command to transform- Returns:
- a transformed SQL select
-
-