2.0.5 ā€¢ Published 3 years ago

fast-database v2.0.5

Weekly downloads
3
License
ISC
Repository
github
Last release
3 years ago

A small SQLite wrapper

šŸ  Homepage

Install

Windows

$ npm install windows-build-tools -g 

$ npm i node-gyp -g

$ npm install fast-database --save

Linux

$ npm i node-gyp -g

$ npm install fast-database --save

Using

const Database = require("fast-database");

const db = new Database({
    path: "./db.sqlite", // path to database file (optional, default ./database.sqlite)
    table: "testing" // default table (optional, default master)
});

/* Basic usage */
const foo = db.get("foo");
console.log(foo) // null
const operation = db.set("foo", "bar");
console.log(operation) // true
const newFoo = db.get("foo");
console.log(newFoo) // bar

/* Using tables */

db.table("foo");

const operation = db.set("foo", "bar");
console.log(operation) // true
const newFoo = db.get("foo");
console.log(newFoo) // bar

const newFooFromOtherTable = db.table('bar').get('foo');
console.log(newFooFromOtherTable); // null !

Author

šŸ‘¤ Aleks1123

Show your support

Give a ā­ļø if this project helped you!

šŸ“ License

Copyright Ā© 2021 Aleks1123. This project is ISC licensed.


2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.1

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago