Class SelectTransformer


  • public class SelectTransformer
    extends Object
    • Constructor Detail

      • SelectTransformer

        public SelectTransformer()
    • 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
      • removeConstraints

        public static String removeConstraints​(String select)