Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository decorator redesign #36

Open
baukevdw opened this issue Jan 29, 2021 · 0 comments
Open

Repository decorator redesign #36

baukevdw opened this issue Jan 29, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@baukevdw
Copy link
Member

The current decorator pattern has some issues. To cope with these issues 2 additional elements will be added.

The first one is the query builder. Instead of modifying queries by passing them through decorators and overriding all methods we could provide the Repository with an immutable query builder that can be used for all methods. Before initialization the query builder can be passed through a set of modifiers to for example filter out the soft deleted records or set a default order.

The second element is a store handler. This is meant to replace the soft deletes, created and updated timestamps. The store handler should be able to modify an entity and change the behavior.
Requirements:

  • Set property before store
  • Change store behavior(soft deletes)
@baukevdw baukevdw added the enhancement New feature or request label Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant