Package 

Class Filter

  • All Implemented Interfaces:

    
    public class Filter
    
                        
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • minus

         final Filter minus(Filter toRemove)

        Allows to get a filter built by removing given filter from the current filter (current filter is not changed by this operation).

        Note: given filter is compared via identity, e.g. if current filter is like a = 1 or (b = 2 or a = 1) and this method is called with Filter.Leaf(SqlTarget.Column("a"), Constraint.Binary(Operator.EQUAL, "1")) then it returns the same filter, i.e. a = 1 or (b = 2 or a = 1) because even though given filter is equal to internal a = 1 sub-filters, it's a different object

      • replaceColumns

         final Filter replaceColumns(Map<String, String> columns)

        Allows creating a filter which is made form the current one but with replaced column names (if any).

        For example, suppose that we have a filter like a = 1 or (a = 2 and b = 3) initially and call this method with mapOf("a" to "x", "b" to "y"). Resulting filter would be x = 1 or (x = 2 and y = 3)

      • dropColumns

         final Filter dropColumns(Function1<String, Boolean> columnNamePredicate)