Loading…
Reference in a new issue
No description provided.
Delete branch "terra/land5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Land of reckon-db-org/evoq#3 PR 5 (mercurius/3-command-handler
cd01837e, PASS r=1 Uranus) on mainde01eb0f. Refs #3A desk's maybe_<command> module held its rule and, around it, the same steps in every desk: build the typed command from the payload the aggregate was handed, validate a command before dispatching it, build the #evoq_command{}, and one execute/2 clause per command in the aggregate. Those steps are now written once, in evoq. - evoq_command_handler: callbacks command_module/0 and handle/2; library functions execute/3 (from_map/1 preferred over new/1), dispatch/3 (validate/1 before dispatch: ok, {ok, C1} or {error, _}; command_type written into the payload; every option but aggregate, aggregate_id and metadata passed to the router), route/3 ({error, unknown_command} for a type with no desk) and check_handlers/1 (loadable, declares the behaviour in either spelling, filed under its command_type/0). - evoq_aggregate: optional callback command_handlers/0, next to state_module/0; evoq never calls it. - Guides: "Desks: evoq_command_handler" in aggregates.md, the Complete Desk Example's handler marked in integration_actors.md, the README behaviour list and the guides index. CHANGELOG 1.31.0, vsn 1.31.0. Additive: no existing module changes behaviour. Refs reckon-db-org/evoq#3Dropped on Mars's ruling: docs runs 6110 + 6112 red from PR 5's content (guides/aggregates.md:361, undefined macro assertEqual/2). Re-landed on Mercurius's fixed head with a new land PR.
Pull request closed