Another mysql
package query wrapper
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.
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 promiseinsert
- Performs an SQL insert returning a promisemodify
- If the entry exists, updates else inserts returning promiseexists
- Check the existence of some entry returning a promisequery
- 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
.