DB Delivery
db-delivery is a node.js library for dealing with sqlite and mysql .
here
The package repo on github ishere
The package on npm isIt's consists of :
- DB, a class the create the connection object.
- Query, a query builder the build the query and have two properities
- queryString, that holds the sql statements.
- queryParams, that hodes the parameters.
Installation
Use the package manager [npm]
npm i db-delivery
Usage
const { db, Query } = require('db-delivery');
const conn = db.Connect('sqlite', 'path/to/sqlite/file');
let query = new Query();
qeruy.select('some, tables, in, database, tab.e')
.from('table name')
.where('column-name', '=', 'value');
let data = conn.get(query.getQueryString(), query.getQueryParams());