Skip to content

lteacher/mysql-query-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Node mysql query wrapping functions

Resources

License

Stars

Watchers

Forks

Packages

No packages published