db-delivery

Micro node module for working with sqlite and mysql.

Usage no npm install needed!

<script type="module">
  import dbDelivery from 'https://cdn.skypack.dev/db-delivery';
</script>

README

DB Delivery

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


It'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());

License


MIT