resolve-snapshot-mysql
v0.23.2
Published
An adapter used to save snapshots in MySQL.
Downloads
6
Readme
resolve-snapshot-mysql
This package is an adapter for storing snapshots using MySQL.
Available Parameters
bucketSize
- the bucket size.tableName
- the name of a table storing snapshots....connectionSettings
- see Connection Settings for more information.
Usage
import createSnapshotAdapter from 'resolve-snapshot-mysql'
const snapshotAdapter = createSnapshotAdapter({
bucketSize: 100,
tableName,
...connectionOptions
})
await snapshotAdapter.loadSnapshot(key)
await snapshotAdapter.saveSnapshot(key, value)
await snapshotAdapter.dispose({ dropSnapshots: true })