Improvements to projection interface
|Reported by:||Andy Buckley||Owned by:||Andy Buckley|
|Keywords:||Cc:||Frank Siegert, hoeth|
Projections should be usable without needing to use the caching system, and it should be possible to clear them and check whether they are in a state where asking questions of them makes sense.
Ideally all projections should be automatically cleared (i.e. projection results removed, but construction parameters retained) between events.
I propose that
Projectioninterface be extended to require
calc(...)methods -- several already do. Whether a common signature is reasonably possible for the calc-type method requires a bit of thought: perhaps this can't be a requirement from the
Projectioninterface but should be a conventional aspect of concrete projection class design.
clear()on all projections at the start of each event, so that the individual
project(Event&)methods don't have to.
- A method to determine whether a projection has been applied could usefully be added, e.g.