Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cls-mysql

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cls-mysql

Continuation local storage shim for MySQL

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
596
increased by490.1%
Maintainers
1
Weekly downloads
 
Created
Source

cls-mysql

cls-mysql provides a shim layer for node-mysql so that it will work with continuation-local-storage. It does this by binding all callbacks that are passed into node-mysql with a CLS namespace.

var cls = require('continuation-local-storage');
var ns = cls.createNamespace('NODESPACE');

var mysql = require('mysql');

// load shim
require('cls-mysql')(ns);

tests

The tests assume that a MySQL server is running on localhost, and the user root can login without password. Alternate database config can optionally be provided in test/config.js. See the node-mysql readme for config options for MySQL connections.

Keywords

FAQs

Package last updated on 21 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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