koa2-sequelize-transaction
v1.0.0
Published
Koa2 middleware to handle Sequelize transactions automatically. Rolls back if any subsequent middleware throws an error.
Downloads
4
Readme
koa2-sequelize-transaction
Koa2 middleware to handle Sequelize transactions automatically. Rolls back if any subsequent middleware throws an error.
Usage
app.use(require('koa2-sequelize-transaction')({ sequelize, namespace: 'your-app-namespace' }));
// Above middleware should run before any other middleware issuing Sequelize queries