More natural configuration of object streams
@medikoo is already working on this.
Since Jan 11, 2016.
- Dominant language
- JavaScript
- Stars
- 27
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
/cc @kamsi
Currently when we want to configure some action on when given object receives certain state, we usually build collection as e.g.
db.BusinessProcess.filterByKey('isRevisionReady', true).on(function (event) { ... });
What's painful is that usually we rewrite similar event handler which works around add, delete, batch events. It might be nicer if we can achieve same via something as:
db.BusinessProcess.stream('isRevisionReady', true).on(function (businessProcess) { .. });
This stream will also at initialization stream all objects that already match expected state.
Additional functionality would be to create a streams that are also guarded by pre-triggers, so we observe specific state change from A to B, and not just fact that object landed at given state.
Very rough idea, on how it may look:
db.BusinessProcess.stream('isRevisionReady', true)
.to('isRevisionApproved', true).on(function (businessProcess) { .. });
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.