metron-mysql

1.0.2 • Public • Published

Metron

A simple package to manage mysql pool setups in nodejs

Installation

npm i metron-mysql --save

Example

Initializing Metron

const metron = require('metron-mysql')

const host = 'localhost'
const user = 'username'
const pass = 'password'
const connectionLimit = 20
const database = 'test_db'


const connection = metron(host, user, pass, connectionLimit, database)

Running Queries

const connection = metron(host, user, pass, connectionLimit, database)

const result = await connection.execute('Show tables;') 
const result1 = await connection.execute('insert into user set ?', {name: 'John Doe', age: 21}) 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    3
  • 1.0.1
    0
  • 1.1.0
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i metron-mysql

Weekly Downloads

2

Version

1.0.2

License

ISC

Unpacked Size

2.62 kB

Total Files

5

Last publish

Collaborators

  • ashok94