Liking cljdoc? Tell your friends :D

telsos.lib.es.inter


create-agg!clj/s

(create-agg! store
             event-type
             agg-type
             agg-attrs
             request-id
             inter-id
             agg-attrs-validator
             selector)

Create a new aggregate with an event. Returns selected projection of new agg, or the full agg map when selector is nil.

Create a new aggregate with an event. Returns selected projection of new agg,
or the full agg map when selector is nil.
raw docstring

create-ver-validatorclj/s

(create-ver-validator {:keys [on-invalid-fn]
                       :or {on-invalid-fn on-ver-mismatch-throw-ex-info}})

Creates a version validator fn that takes a map with :agg-ver (expected by caller), :current-agg-ver (actual in store), plus context keys :event-type, :agg-type, :agg-id, :request-id, :inter-id. Returns current-agg-ver on match. Calls on-invalid-fn with the full map on mismatch.

Creates a version validator fn that takes a map with :agg-ver (expected by caller),
:current-agg-ver (actual in store), plus context keys :event-type, :agg-type,
:agg-id, :request-id, :inter-id. Returns current-agg-ver on match.
Calls on-invalid-fn with the full map on mismatch.
raw docstring

modify-agg!clj/s

(modify-agg! store
             event-type
             agg-type
             agg-id
             agg-ver
             agg-attrs-delta
             request-id
             inter-id
             agg-attrs-validator
             ver-validator
             selector)

Modify an existing aggregate with a delta merge. Returns selected projection of updated agg (or the full agg map when selector is nil), or nil if aggregate not found.

Modify an existing aggregate with a delta merge. Returns selected projection
of updated agg (or the full agg map when selector is nil), or nil if aggregate
not found.
raw docstring

on-ver-mismatch-throw-ex-infoclj/s

(on-ver-mismatch-throw-ex-info data)

on-ver-mismatch-throw-invalidclj/s

(on-ver-mismatch-throw-invalid data)

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close