<commit_before>module Quickbooks
  module Service
    module ServiceCrud

      def query(object_query = nil, options = {})
        fetch_collection(object_query, model, options)
      end

      def query_in_batches(object_query=nil, options={})
        page = 0
        per_page = options.delete(:per_page) || 1_000
        begin
          page += 1
          results = query(object_query, page: page, per_page: per_page)
          yield results if results.count > 0
        end until results.count < per_page
      end
<commit_msg>forgot to save the file!<commit_after>module Quickbooks
  module Service
    module ServiceCrud

      def query(object_query = nil, options = {})
        fetch_collection(object_query, model, options)
      end

      def query_all(object_query=nil, options={})
        collection = []
        self.query_in_batches(object_query, options) do |batch|
          collection << batch.entries
        end
        collection.flatten!
      end

      def query_in_batches(object_query=nil, options={})
        page = 0
        per_page = options.delete(:per_page) || 1_000
        begin
          page += 1
          results = query(object_query, page: page, per_page: per_page)
          yield results if results.count > 0
        end until results.count < per_page
      end

{'fraction_non_alphanumeric': 0.08116385911179173, 'fraction_numerical': 0.010719754977029096, 'mean_word_length': 2.342710997442455, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '4724507', 'n_tokens_mistral': 384, 'n_tokens_neox': 368, 'n_words': 99}