Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 1.31 KB

README.md

File metadata and controls

22 lines (15 loc) · 1.31 KB

Mysql Query Wrapper

Another mysql package query wrapper

NPM

Build Status Coverage Status

Probably like most of the other examples, in refactoring code to make it nicer to use the mysql package these functions emerged so why not randomly publish them. If you want to use then obviously go for it. Any issues or features create them at github.

Features

Converts the mysql query to one that returns a promise unless a callback is provided.

Also adds the following functions which can take a single column condition:

  • update - Performs an SQL update returning a promise
  • insert - Performs an SQL insert returning a promise
  • modify - If the entry exists, updates else inserts returning promise
  • exists - Check the existence of some entry returning a promise
  • query - Mysql all purpose query which uses the default callback if provided else returns a promise

For usage examples take a look in test/test.js.