finemysql
A tiny mysql wrapper that adds capabilities of immutability, promises, and carefree connections management.
Installation
$ npm i -S finemysql
Quick start
const mysql = ; const db = user: 'test' password: 'test' database: 'test'; db ;
Goal
finemysql was created just to simplify the use of nodejs driver for mysql. it uses bluebirdjs to convert old callbacks to promises, and immutablejs to keep your data reliable and consistent throughout your app. all those, along with a done right connections management, allow you to use mysql easier than ever before. Enjoy!
API
require('finemysql')
DB Class initialize(constructor):
Creates a new db instance.
const db = options;
for the options list please refer to mysql module docs.
Methods:
Name | Description | Syntax | Return Value |
---|---|---|---|
invoke() | Runs the query with the escapeArr on the db instance. | db.invoke(query, escapeArr = []); | A promise with the result (Immutable collection) (can also be rejected to the catch). |
Examples
for examples please look at the example page.