New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

egg-sequelize-autotrx

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-sequelize-autotrx - npm Package Compare versions

Comparing version 0.0.22 to 0.0.23

8

app/middleware/transaction.js

@@ -39,6 +39,6 @@ module.exports = (options, app) => async (ctx, next) => {

if (transaction) {
app.loggers.coreLogger.info(`[egg-sequelize-autotrx] ctx.[${delegate}].transaction specified transaction`)
app.loggers.coreLogger.info(`[egg-sequelize-autotrx] ctx.${delegate}.transaction specified transaction`)
return oldTrx.call(model, { transaction }, task)
} else {
app.loggers.coreLogger.info(`[egg-sequelize-autotrx] ctx.[${delegate}].transaction no specified transaction`)
app.loggers.coreLogger.info(`[egg-sequelize-autotrx] ctx.${delegate}.transaction no specified transaction`)
return oldTrx.call(model, task)

@@ -49,3 +49,3 @@ }

// will call original transaction function directly, without inject transaction in cls
app.loggers.coreLogger.info(`[egg-sequelize-autotrx] ctx.[${delegate}].transaction call original method`)
app.loggers.coreLogger.info(`[egg-sequelize-autotrx] ctx.${delegate}.transaction call original method`)
return oldTrx.call(model, ...args)

@@ -55,4 +55,4 @@ }

model.transaction.__injected = true
app.loggers.coreLogger.info(`[egg-sequelize-autotrx] ctx.[${delegate}].transaction is injected`)
app.loggers.coreLogger.info(`[egg-sequelize-autotrx] ctx.${delegate}.transaction is injected`)
}
}
{
"name": "egg-sequelize-autotrx",
"version": "0.0.22",
"version": "0.0.23",
"description": "Auto transaction based on cls-hooked for egg-sequelize plugin",

@@ -5,0 +5,0 @@ "eggPlugin": {

@@ -168,2 +168,12 @@ # egg-sequelize-autotrx

If you need your nested transaction commit by itself, you can do:
```js
async innerTrx () {
await this.ctx.model.transaction({ transaction: null }, async () => {
// specify the transaction as null, so it will not populated from parent transaction from cls
})
}
```
## Questions & Suggestions

@@ -170,0 +180,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc