<commit_before>module ActsAsArchive
  module Base
    module Adapters
      module MySQL
        
        private

        def archive_table_indexed_columns
          index_query = "SHOW INDEX FROM archived_#{table_name}"
          indexes = connection.select_all(index_query).collect do |r|
            r["Column_name"]
          end
        end
      end
    end
  end
end<commit_msg>Add multi-columns indexes support for MySQL<commit_after>module ActsAsArchive
  module Base
    module Adapters
      module MySQL
        
        private

        def archive_table_indexed_columns
          index_query = "SHOW INDEX FROM archived_#{table_name}"
          indexes = connection.select_all(index_query)
          final_indexes = []
          current_index = 0
          indexes.each do |index|
            if index['Seq_in_index'] != '1'
              final_indexes[current_index-1] = Array(final_indexes[current_index-1]).flatten.concat(Array(index['Column_name']))
            else
              final_indexes[current_index] = index['Column_name']
              current_index += 1
            end
          end
          return final_indexes
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.06497890295358649, 'fraction_numerical': 0.004219409282700422, 'mean_word_length': 1.965, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7380178', 'n_tokens_mistral': 339, 'n_tokens_neox': 326, 'n_words': 74}