Skip to content

Add built-in batching support to Repository save and remove overloads #469

@patroza

Description

@patroza

Background:

Adapters like CosmosDB do not support more than 100 items in a batch.
However when batching, one breaks the transactional properties (one batch may succeed, while another fails).
As such we've left this to the user to explicitly enable.

This however makes it more verbose to do this and repeat it. As such, we should add a batch option: batch?: true | number
with the default being not defined = no batching.
The option should be documented to break transactional properties, so that the user is aware and can adjust approach.

For overloads that support ...items, we could use currying, first passing the settings, then the items.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions