Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Introduce '!' method equivalents given new 'acquire_in'/'acquire_in!' #225

Open
pond opened this issue Nov 1, 2017 · 0 comments
Open

Introduce '!' method equivalents given new 'acquire_in'/'acquire_in!' #225

pond opened this issue Nov 1, 2017 · 0 comments

Comments

@pond
Copy link
Contributor

pond commented Nov 1, 2017

#223 introduces acquire_in, which adds errors to the given context automatically. This arises from the addition of generic.contemporary_exists, which would cause quite high and error-prone service implementation complexity if no automated approach was provided.

Although create-in/update-in/delete-in context mechanisms don't necessarily have the same level of complexity, there is still common boilerplate arising. For those who don't like the idea of mutating the context hierarchy then that approach is still fine, but adding in corresponding "!" methods makes sense for those who want simpler service code.

Examples:

  • update_in leads to update_in! (could add both "not-found" and e.g. validation errors)
  • manually_dated_destruction_in leads to manually_dated_destruction_in! (could add "not-found")
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant