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

Implement key selectors #122

Merged
merged 7 commits into from
Feb 11, 2022
Merged

Implement key selectors #122

merged 7 commits into from
Feb 11, 2022

Conversation

woksin
Copy link
Contributor

@woksin woksin commented Feb 10, 2022

Summary

Adds two new event key selectors to projections, StaticKey and KeyFromEventOccurred

Added

  • staticKey event key selector attribute for projection On-methods that sets a constant, static, key as the key of the read model
  • keyFromEventOccurred event key selector for projection On-methods that uses the event occurred metadata as the key for the projection read models formatted as the string given to the attribute. We currently support these formats:
    • yyyy-MM-dd
    • yyyy-MM
    • yyyy
    • HH:mm:ss
    • hh:mm:ss
    • HH:mm
    • hh:mm
    • HH
    • hh
    • yyyy-MM-dd HH:mm:ss
    • And the above in different orderings

@woksin woksin added the minor label Feb 10, 2022
Source/projections/EventOccurredKeySelector.ts Outdated Show resolved Hide resolved
Source/projections/StaticKeySelector.ts Outdated Show resolved Hide resolved
Source/projections/StaticKeySelector.ts Outdated Show resolved Hide resolved
@woksin woksin requested a review from jakhog February 11, 2022 09:14
@jakhog jakhog merged commit fd5aacf into master Feb 11, 2022
@jakhog jakhog deleted the implement-key-selectors branch February 11, 2022 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants