Simple and flexible way to write your next MySQL queries.
Writing queries with mysql is difficult because it doesn't supports ES6 Promise and while working on a personal project I found that same queries are repeated over and over.
I have come up with a simple and flexible solution for writing repetitive queries using active query builder. This pattern allows information to be retrieved, inserted, and updated in your database with minimal scripting. In some cases only one or two lines of code are necessary to perform a database action.
const ActiveQueryBuilder =// make connection to your databaseconst conn =host: 'localhost'user: 'root'password: 'root'database: 'sandbox'// query methodconn// get methodconn// get_where methodconn
Things you need to install the package
- Node 8.10 or above
- MySQL community edition
A step by step series of examples that tell you how to get a development env running
Say what the step will be
npm install mysql active-query-builder --save
Running the tests
Tests gives us confidence, hence we have written tests for each method. Before creating pull request make sure that you have passed all tests
npm run test
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Sagar Gavhane - core author
This project is licensed under the MIT License - see the LICENSE.md file for details