elasticsearch-model/lib/elasticsearch/model/adapters/cequel.rb
# Fetch batches of records from the database (used by the import method)
#
# @see http://api.rubyonrails.org/classes/ActiveRecord/Batches.html ActiveRecord::Batches.find_in_batches
#
Fetch batches of records from the database (used by the import method)
Fetch batches of records from the database ( used by the import method )
def __find_in_batches(options = {}, &block)
            query = options.delete(:query)
            named_scope = options.delete(:scope)
            preprocess = options.delete(:preprocess)
            scope = self
            scope = scope.__send__(named_scope) if named_scope
            scope = scope.instance_exec(&query) if query
            scope.find_in_batches(**options) do |batch|
              batch = self.__send__(preprocess, batch) if preprocess
              yield(batch) if batch.present?
            end
          end
def __find_in_batches ( options = { } , & block ) query = options . delete ( :query ) named_scope = options . delete ( :scope ) preprocess = options . delete ( :preprocess ) scope = self scope = scope . __send__ ( named_scope ) if named_scope scope = scope . instance_exec ( & query ) if query scope . find_in_batches ( ** options ) do | batch | batch = self . __send__ ( preprocess , batch ) if preprocess yield ( batch ) if batch . present? end end
Fetch batches of records from the database (used by the import method)
Fetch batches of records from the database ( used by the import method )
options
<not_specific>
block
<not_specific>
see
None