An adapter for storing event sourcing snapshots in MySQL, part of the reSolve framework for CQRS/ES applications. As of v0.23.2, it provides loadSnapshot, saveSnapshot, and dispose operations with configurable bucket size and table name. Typically used alongside resolve-command and resolve-query. The package relies on mysql2 for database connectivity. Alternative adapters exist for PostgreSQL and SQLite within the reSolve ecosystem.
npm install resolve-snapshot-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a snapshot adapter for MySQL, saves and loads a snapshot, then disposes without dropping snapshots.
Create the snapshots table manually or use a migration tool before creating the adapter.
Always pass an integer value for bucketSize (e.g., bucketSize: 100).
Use import createSnapshotAdapter from 'resolve-snapshot-mysql' and call it to get the adapter.
Use 'host' instead of 'hostname' in the connection settings.
npm install resolve-snapshot-mysql
Use import createSnapshotAdapter from 'resolve-snapshot-mysql' (default import).
Create the snapshots table with the required schema before using the adapter.