db-delivery is a node.js library for dealing with sqlite and mysql .
The package repo on github is here
The package on npm is here
- 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.
Use the package manager [npm]
npm i db-delivery
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());