Module DataMapper::ChunkedQuery::Mixin
In: lib/dm-chunked_query/mixin.rb

Methods

Public Instance methods

Reads in records in batches and processes them.

@param [Integer] per_batch

  The number of resources per-batch.

@yield [resource]

  The given block will be passed each resource from each batch
  of resources.

@yieldparam [DataMapper::Resource] resource

  A resource from the batch.

@return [Chunks]

  The abstract collection of chunks from the query.

@see each_chunk

@since 0.3.0

Allows chunked access to the resources from a query.

@param [Integer] per_chunk

  The number of resources per-chunk.

@return [Chunks]

  The abstract collection of chunks from the query.

Enumerate over every chunk.

@param [Integer] per_chunk

  The number of resources per-chunk.

@yield [chunk]

  A chunk of resources within the query.

@yieldparam [DataMapper::Collection] chunk

  A collection of resources that makes up the chunk.

@return [Chunks]

  The abstract collection of chunks from the query.

@see chunks

@since 0.2.0

[Validate]