An adapter for the reSolve framework that stores domain events in a MySQL database. Version 0.23.2 is the latest stable release, with a slow release cadence. It provides event persistence for CQRS/Event Sourcing applications, using the mysql2 library under the hood. Compared to other adapters (e.g., Postgres, SQLite), it offers MySQL-specific connection settings and table configuration.
npm install resolve-storage-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import and configure the MySQL adapter with environment variables.
Always include 'tableName' in the config object passed to createAdapter.
Ensure the MySQL database specified in `database` exists before initializing the adapter.
Use `Number(process.env.MYSQL_PORT) ?? 3306` or hardcode as a number.
Refer to mysql2 documentation for additional connection options like `socketPath`, `ssl`, etc.
Run `npm install resolve-storage-mysql` or `yarn add resolve-storage-mysql`.
Use `import createAdapter from 'resolve-storage-mysql'` (default import) instead of `import { createAdapter } from 'resolve-storage-mysql'`.