Huge News!Announcing our $40M Series B led by Abstract Ventures.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.23 to 1.0.0

0

app.js

@@ -0,0 +0,0 @@ module.exports = app => {

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

2

package.json
{
"name": "egg-sequelize-autotrx",
"version": "0.0.23",
"version": "1.0.0",
"description": "Auto transaction based on cls-hooked for egg-sequelize plugin",

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

@@ -93,10 +93,7 @@ # egg-sequelize-autotrx

// config.xx.js
const mySequelize1 = require('sequelize')
const mySequelize2 = require('sequelize')
const clsNamespace1 = require('cls-hooked').createNamespace('your-namespace1')
const clsNamespace2 = require('cls-hooked').createNamespace('your-namespace2')
const mySequelize = require('sequelize')
const clsNamespace = require('cls-hooked').createNamespace('your-namespace')
// create multiple namespaces for multiple customized sequelize
mySequelize1.useCLS(clsNamespace1)
mySequelize2.useCLS(clsNamespace2)
mySequelize.useCLS(clsNamespace)

@@ -108,4 +105,4 @@ module.exports = appInfo => {

config.sequelize = {
Sequelize: mySequelize,
datasources: [{
Sequelize: mySequelize1,
delegate: 'model1',

@@ -115,3 +112,2 @@ dialect: 'mysql'

}, {
Sequelize: mySequelize2,
delegate: 'model2',

@@ -118,0 +114,0 @@ dialect: 'mysql'

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