Skip to content

in_batches method for queries #85

@rferg

Description

@rferg

Add a method like ActiveRecord's in_batches that allows consumers to run a block with each batch of records instead of waiting for the entire result set to resolve before continuing.

We could manually page through the Restforce collection and run the given block on each page. However, providing custom batch sizes per request is complicated. It requires setting this header on the request and Restforce only takes custom headers on client initialization. We won't want to modify this option on a single query because the client is shared.

If a convenient solution to this problem isn't found, we could keep the initial implementation as taking no arguments and uses the current batch size that's set on the client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions