(WIP) MongoDB (w/ mongoose
) Event Store Implentation
#126
+2,715
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work in progress PR for an
EventStore
implementation formongodb
.I am utilizing mongoose to assist in the model definition but this is only as a wrapper for the actual mongodb driver. If we don't want to use
mongoose
I can look at removing it's usage.Another thing that might need to change is using
number
for the default stream version instead of abigint
. I only did this to make dealing with the version checking easier. In this impl., the stream version is determined by the number of events which is an array field on the document representing each event stream and that.length
field is always a number type.@oskardudycz looking forward on working on this one with you and getting this in once it's fully ready