dot-mysql

0.0.29 • Public • Published

Dot-MySQL ·

dot-mysql is a JavaScript library for building mysql queries.

Build Status npm lowest npm lowest

· API · JSDOC ·

Installation

npm install --save dot-mysql

Usage

Import
import MySQL from 'dot-mysql'
Config
import MySQL from 'dot-mysql';

MySQL.config({
  host: 'localhost',
  port: 3306,
  database: 'test',
  user: 'root',
  password: ''
});
Direct Query
import MySQL from 'dot-mysql';

MySQL
    .query({ sql: 'SELECT * FROM table' })
    .then(({ results }) => {
        console.log(results);
    });
Query Builder
import MySQL from 'dot-mysql';

const db = new MySQL();
db
    .select('*')
    .from('table')
    .exec()
    .then(({ results }) => {
        console.log(results);
    });

Readme

Keywords

none

Package Sidebar

Install

npm i dot-mysql

Weekly Downloads

1

Version

0.0.29

License

ISC

Unpacked Size

93.6 kB

Total Files

9

Last publish

Collaborators

  • slh4ck3r