mysync

1.2.3 • Public • Published

Mysync

Mysync is a quick and simple way to query mysql synchronous

Installation

npm install mysync

Usage

const mysql = require('mysync')

const connection = new mysql({
      host: 'your-mysql-host',
      database: 'your-mysql-database',
      user: 'your-mysql-user',
      password: 'your-mysql-password'
})

const result1 = connection.query('SELECT * FROM users')
const result2 = connection.query('SELECT * FROM users WHERE id = ?', ['abc123'])

Response

The query function always repond with an object with containing properties. Type & Data... Type contains eighter "response" or "error". And data contains the value of eighter the response or error

License

MIT

Package Sidebar

Install

npm i mysync

Weekly Downloads

0

Version

1.2.3

License

MIT

Unpacked Size

2.72 kB

Total Files

3

Last publish

Collaborators

  • nitschedev