Skip to content

feature: batch mapper #1854

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Bertg
Copy link

@Bertg Bertg commented Mar 28, 2025

This PR is a follow-up of the conversation here: https://github.com/orgs/RailsEventStore/discussions/1847

A small chance is made to how event store invokes the mapper for reading events. By default it will still handle each event one by one, but it does that now inside the mapper, instead of the Specification::Reader. This provides a hook for developers to do some batch work on their mappers (eg: preloading encryption keys).

Thins to consider, improve:

  • Mutation tests are failing, but they are failing on code not directly touched by this PR
  • Naming of the map_records_to_events method
  • The warning in SpecificationReader shows up only once in an application, but during tests it shows up a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant