(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.
(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.
(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.
(on-ver-mismatch-throw-ex-info data)(on-ver-mismatch-throw-invalid data)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |