sqlite-conn

1.0.1 • Public • Published

sqlite-conn

Connect to sqlite3 database and save select queries to JSON format.

Installation

sqlite-conn requires sqlite3 to run.

Install the dependencies and devDependencies and start the server.

$ npm install -sqlite-conn

Example

For production environments... database is exampl from sqlite3 page.

const sqlite3 = require('sqlite3').verbose();
const fs = require('fs');
const dr = require('sqlite-conn');

//file .json to save the result of the sql query
const file = "OneValue.json";

//database file
const mdb = '../../baza/chinook.db';

//sql queries
var sql = 'SELECT distinct FirstName,LastName,InvoiceDate,Total,invoiceId,CustomerId FROM InvoicesTrackCustomerVw WHERE CustomerId = 25';

dr.saveDataToJson(mdb,sql,file);
the end

Readme

Keywords

Package Sidebar

Install

npm i sqlite-conn

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

3.41 kB

Total Files

4

Last publish

Collaborators

  • ztach