🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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
Version published
Weekly downloads
518
78.62%
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

continuation-local-storage

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