1.0.0 ā¢ Published 3 years ago
@aleks1123/easy-database v1.0.0
A small SQLite wrapper
š Homepage
Install
npm install easy-database --save
Using
let Database = require("easy-database");
let db = new Database({
path: "./db.sqlite", // path to database file (optional, default ./database.sqlite)
table: "testing" // default table (optional, default master)
});
/* Basic usage */
let foo = db.get("foo");
console.log(foo) // null
let operation = db.set("foo", "bar");
console.log(operation) // true
let newFoo = db.get("foo");
console.log(newFoo) // bar
/* Using tables */
db.table("foo");
let operation = db.set("foo", "bar");
console.log(operation) // true
let newFoo = db.get("foo");
console.log(newFoo) // bar
let newFooFromOtherTable = db.table('bar').get('foo');
console.log(newFooFromOtherTable); // null !
Author
š¤ Aleks1123
- Website: http://aleks.ovh
- Github: @Aleks-1123
Show your support
Give a āļø if this project helped you!
š License
Copyright Ā© 2021 Aleks1123. This project is ISC licensed.
This README was generated with ā¤ļø by readme-md-generator
1.0.0
3 years ago