Mysql Query Wrapper
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 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