Socket
Socket
Sign inDemoInstall

cls-mysql

Package Overview
Dependencies
16
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cls-mysql

Continuation local storage shim for MySQL


Version published
Weekly downloads
140
increased by2.19%
Maintainers
1
Install size
37.9 kB
Created
Weekly downloads
 

Changelog

Source

v1.0.3 (2017-09-21)

  • PR #2 - Bind only if the callback is not undefined. Fixes #1 Thanks @cheolgook

Readme

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

Last updated on 21 Sep 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc