1.0.1 • Published 5 years ago

sqlite-storage v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

SQLite Storage

SQLite connection provider for multi javascript environments

Installation

npm install sqlite-storage --save

Usage

const sqliteStorage = require('sqlite-storage');

const databases = [
  {
    name: "data",
    path: "/path/to/databases/data.db"
  },
  {
    name: "images",
    path: "/path/to/databases/images.db",
    attach: true
  }
];

const connection = new sqliteStorage({
  databases
});

connection.connect().then(() => {
  connection.executeQuery(`SELECT 1 as data FROM test;`).then((rows) => {
    console.log(rows);
    connection.close();
  });
});
1.0.1

5 years ago

1.0.0

5 years ago