0.0.29 • Published 2 years ago

dot-mysql v0.0.29

Weekly downloads
1
License
ISC
Repository
github
Last release
2 years ago

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);
    });
0.0.29

2 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.1

6 years ago