def sorts_by_method?
      @clauses.any? { |sorting| sorting[0].sort.is_a?(Hash) && sorting[0].sort.key?(:method) }
    end
def sorts_by_method?
      @clauses.any? { |sorting| sorting[0].sort.is_a?(Hash) && sorting[0].sort.key?(:method) }
    end
checks whether any column is configured to sort by method (using a proc)