Nanoscale Parts Manufacturing

    mysql-query-wrapper

    1.0.0-alpha • Public • Published

    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.

    Install

    npm i mysql-query-wrapper

    DownloadsWeekly Downloads

    4

    Version

    1.0.0-alpha

    License

    MIT

    Last publish

    Collaborators

    • lessonteacher