We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here's the recommended outline:
That can be done in a similar way as in the PostgreSQL event store options.
Something like:
export type InMemoryReadEventMetadata = ReadEventMetadataWithGlobalPosition; export type InMemoryProjectionHandlerContext = { eventStore: InMemoryEventStore }; export type InMemoryEventStoreOptions = DefaultEventStoreOptions<InMemoryEventStore> & { projections?: ProjectionRegistration< 'inline', InMemoryReadEventMetadata, InMemoryProjectionHandlerContext >[]; };
Then, cache them in a similar fashion as Postgres projections.
You can clone this one for now: https://github.com/oskardudycz/EventSourcing.NodeJS/blob/main/workshops/introduction_to_event_sourcing/src/11_projections_single_stream/tools/database.ts.
Replace JSON.parse and JSON.stringify with Emmett JSONParser
JSON.parse
JSON.stringify
handle
It's placed here, should be copy/paste with small adjustments: https://github.com/event-driven-io/Pongo/blob/1a7e6f56454de6f25fa1e58aacf66b3044a434d0/src/packages/pongo/src/core/collection/pongoCollection.ts#L338.
See them: https://github.com/event-driven-io/emmett/blob/52a3ba72359c4ae2de1a041c7dac3d74f77f0a63/src/packages/emmett-postgresql/src/eventStore/projections/pongo/projections.ts
And writeup about them: https://event-driven.io/en/emmett_projections_testing/
Each can be a dedicated PR.
The text was updated successfully, but these errors were encountered:
@stepaniukm, how does that sound to you?
Sorry, something went wrong.
No branches or pull requests
Here's the recommended outline:
1. Add inline projection setup to InMemoryEventStore options
That can be done in a similar way as in the PostgreSQL event store options.
Something like:
Then, cache them in a similar fashion as Postgres projections.
2. Add InMemoryDatabase
You can clone this one for now: https://github.com/oskardudycz/EventSourcing.NodeJS/blob/main/workshops/introduction_to_event_sourcing/src/11_projections_single_stream/tools/database.ts.
Replace
JSON.parse
andJSON.stringify
with Emmett JSONParser3. Port
handle
method to InMemoryDatabase based on Pongo oneIt's placed here, should be copy/paste with small adjustments: https://github.com/event-driven-io/Pongo/blob/1a7e6f56454de6f25fa1e58aacf66b3044a434d0/src/packages/pongo/src/core/collection/pongoCollection.ts#L338.
4. Add similar projections like in Pongo
See them: https://github.com/event-driven-io/emmett/blob/52a3ba72359c4ae2de1a041c7dac3d74f77f0a63/src/packages/emmett-postgresql/src/eventStore/projections/pongo/projections.ts
And writeup about them: https://event-driven.io/en/emmett_projections_testing/
Notes
Each can be a dedicated PR.
The text was updated successfully, but these errors were encountered: