nano-mysql
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i nano-mysql

Homepage

nanosql.io

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

24.7 kB

Total Files

9

Last publish

Collaborators

  • clicksimply