Add GetLowLevelAsync to event stores with provider test coverage#278
Open
MPapst wants to merge 4 commits into
Open
Add GetLowLevelAsync to event stores with provider test coverage#278MPapst wants to merge 4 commits into
MPapst wants to merge 4 commits into
Conversation
- Created ILowLevelEventStore interface in core Papst.EventStore project - Added ILowLevelEventStream implementation to all event stream classes: - InMemoryEventStream - EntityFrameworkEventStream - FileSystemEventStream - MongoDBEventStream - Implemented ILowLevelEventStore for all providers: - InMemoryLowLevelEventStore - EntityFrameworkCoreLowLevelEventStore - FileSystemLowLevelEventStore - MongoDBLowLevelEventStore - Registered ILowLevelEventStore in all provider DI extensions - Updated README files to document ILowLevelEventStore usage: - InMemory, EntityFrameworkCore, MongoDB READMEs updated - FileSystem README created - Low-level event store enables handling events as raw JObject without compile-time type information Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Added GetLowLevelAsync(Guid, CancellationToken) -> Task<ILowLevelEventStream> to IEventStore interface - Implemented in InMemoryEventStore, EntityFrameworkEventStore, FileSystemEventStore, MongoDBEventStore, and CosmosEventStore - All stream classes implement both IEventStream and ILowLevelEventStream - Fixed FileSystem JObject serialization bug: added JObjectJsonConverter for System.Text.Json - Added test projects: Papst.EventStore.EntityFrameworkCore.Tests and Papst.EventStore.FileSystem.Tests - Added GetLowLevelAsync integration tests to InMemory, MongoDB, EF Core, and FileSystem test projects Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
The low-level append API should be accessible from the existing
IEventStoreabstraction without introducing a second store interface. This change aligns provider behavior and makes low-level event appends available consistently across backends.What changed
GetLowLevelAsync(Guid, CancellationToken)toIEventStorereturningILowLevelEventStream.GetLowLevelAsyncin all provider stores: InMemory, EntityFrameworkCore, FileSystem, MongoDB, and AzureCosmos.ILowLevelEventStream.ILowLevelEventStoreapproach and related provider registrations.Papst.EventsStore.InMemory.TestsPapst.EventStore.EntityFrameworkCore.Tests(new)Papst.EventStore.FileSystem.Tests(new)Papst.EventStore.MongoDB.TestsPapst.EventStore.slnx.Non-obvious fix included
While implementing FileSystem low-level coverage, a pre-existing
System.Text.JsonandNewtonsoft.Json.Linq.JObjectround-trip issue surfaced. This PR adds aJObjectJsonConverterin the FileSystem provider and wires it into serialization/deserialization paths so persisted event documents deserialize correctly.Notes for reviewers
IEventStore.GetLowLevelAsync(...)usage instead of a separate low-level store.