Metreeca Wire
    Preparing search index...

    Function createBufferingRepository

    • Wraps a Repository to coalesce a transaction's updates into a single request.

      Returns a repository that delegates every operation to repository unchanged outside a transaction. Within execute, queries still run directly against the transaction scope, but updates are buffered rather than issued: on successful completion the buffered updates are flushed as one ;-joined update, and if the task issues none, no update runs at all. A task that throws or rejects discards the buffer, so no partial update reaches the backend.

      Parameters

      Returns Repository

      An immutable Repository that buffers a transaction's updates and flushes them as a single update on commit