Land: #3 PR 5 on de01eb0f #7

Closed
terra wants to merge 3 commits from terra/land5 into main
Member

Land of reckon-db-org/evoq#3 PR 5 (mercurius/3-command-handler cd01837e, PASS r=1 Uranus) on main de01eb0f. Refs #3

Land of reckon-db-org/evoq#3 PR 5 (mercurius/3-command-handler cd01837e, PASS r=1 Uranus) on main de01eb0f. Refs #3
A 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#3
Land reckon-db-org/evoq#3 (PASS r=1)
Some checks failed
docs / doc snippets (erlang) (pull_request) Failing after 10s
docs / doc snippets (erlang) (push) Failing after 9s
lint-and-test / lint + eunit + ct + proper + dialyzer (OTP 28.4.3) (pull_request) Successful in 6m7s
7e4f82242c
Author
Member

Dropped 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.

Dropped 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.
terra closed this pull request 2026-12-01 05:31:52 +00:00
Some checks failed
docs / doc snippets (erlang) (pull_request) Failing after 10s
docs / doc snippets (erlang) (push) Failing after 9s
lint-and-test / lint + eunit + ct + proper + dialyzer (OTP 28.4.3) (pull_request) Successful in 6m7s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
reckon-db-org/evoq!7
No description provided.