<commit_before>module ActiveScaffold
  module Finder
    def self.create_conditions_for_columns(tokens, columns, like_pattern = '%?%')
      tokens = [tokens] if tokens.is_a? String

      where_clauses = []
      columns.each do |column|<commit_msg>bugfix: if there aren't any columns to search on, then activescaffold shouldn't create a "WHERE (())" clause<commit_after>module ActiveScaffold
  module Finder
    def self.create_conditions_for_columns(tokens, columns, like_pattern = '%?%')
      # if there aren't any columns, then just return a nil condition
      return nil unless columns.length

      tokens = [tokens] if tokens.is_a? String

      where_clauses = []
      columns.each do |column|
{'fraction_non_alphanumeric': 0.09078014184397164, 'fraction_numerical': 0.0, 'mean_word_length': 3.8689655172413793, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6365026', 'n_tokens_mistral': 210, 'n_tokens_neox': 200, 'n_words': 63}