serverlesstechnology / cqrs

A lightweight, opinionated CQRS and event sourcing framework.
Other
346 stars 36 forks source link

Questions: deleting events and query by aggregate property #60

Closed epsilonhalbe closed 1 year ago

epsilonhalbe commented 1 year ago

Is there a way to delete events from the database, I am asking bc. for GDPR purposes I need to be able to delete user data if requested.

Also if I create a view say of a user(id, name, email) aggregate - can I query by name or email through the cqrs framework? Of course I can always create queries that write to the db with raw sql and then query those with raw sql as well.

epsilonhalbe commented 1 year ago

I did a bit of googling, sorry probably should have done this first and will opt for storing personally identifiable data in a separate database entity.

davegarred commented 1 year ago

In CQRS events are immutable so the framework enforces that. Any sort of direct modification of the events, deleting/editing/etc., will have to be done outside of this framework.

epsilonhalbe commented 1 year ago

@davegarred what about the second part of my question - if it is possible to query entities based on different properties than just the id?