Socket
Socket
Sign inDemoInstall

nano-mysql

Package Overview
Dependencies
108
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nano-mysql

MySQL Adapter for NanoSQL


Version published
Maintainers
1
Install size
18.8 MB
Created

Readme

Source

Nano-MySQL

MySQL Driver for Nano SQL

nanoSQL Logo

NPM

Documentation

Installation

npm i --save nano-mysql

Usage

import { nSQL } from "nano-sql";
import { MySQLAdapter } from "nano-mysql";

nSQL("table")
.model([...])
.config({
    mode: new MySQLAdapter({ // required
            host: "localhost",
            database: "test",
            user: "root",
            password: "secret"
    }),
    ...other config options
}).connect()...

That's it, now everything NanoSQL can do you can do with MySQL.

Read about NanoSQL here.

API

When you call new MySQLAdapter the adapter internally calls mysql.createPool() from the mysql package.

The default pool size is 20, you can modify this with the connectionLimit property. All of the typical configuration options you would use are in the example above, refer the mysql package documentation for an exaustive list of options.

FAQs

Last updated on 20 Jul 2018

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