@metreeca/keep
    Preparing search index...

    Function createBatchingStore

    • Creates a batching store client backed by a set of request handlers.

      Coalesces concurrent StoreClient calls into batches, each served by the matching handlers entry. The client adds conditional CRUD semantics on top of the handlers: create, update and delete probe for existence through the detect handler before handing the mutation to modify. create mints the identifier of the new resource, if its state names none, and links it to the collecting resource.

      The modify handler receives only requests whose state carries no id other than their entry. A request failing this check is rejected on its own, and the rest of the batch still applies. If the modify handler throws, the error rejects every request in its batch.

      Parameters

      Returns StoreClient

      An immutable StoreClient serving its requests in batches through handlers

      RangeError If an update or insert state carries an id that differs from its entry, or if a create state member filling an identifier slot is not a single path segment