Quick.db
Website / Documentation | Support Discord | NPM Page |
---|---|---|
https://quickdb.js.org | https://discord.gg/8nrEqvP | https://www.npmjs.com/package/quick.db |
Quick.db is an open-sourced package meant to provide an easy way for beginners, and people of all levels to access & manage a database. All data is stored persistently, and comes with various extra features, such as a queue system to prevent database locking, and more.
Want to provide feedback to help improve Quick.db? Click Here!
Example
All data in quick.db is stored persistently in a database. Here is an example of setting an object in the database, then fetching parts & the full object.
const db = require('quick.db');
// Setting the FULL object
db.set('userInfo', { part1: 'Hello', part2: 'World!' }).then( i => console.log(i))
// -> { part1: 'Hello', part2: 'World!' }
// Fetching only PARTS of the object
db.fetch('userInfo', { target: '.part1' }).then( i => console.log(i))
// -> 'Hello'
db.fetch('userInfo', { target: '.part2' }).then( i => console.log(i))
// -> 'World!'
// Fetching the FULL object
db.fetch('userInfo').then( i => console.log(i))
// -> { part1: 'Hello', part2: 'World!' }
Installation
Linux
npm i quick.db
Windows
- Open CMD as Administrator
- Run
npm -g install windows-build-tools node-gyp --save
npm i quick.db
Mac
- We are currently looking for a way to install quick.db for this device
Require Package
var db = require('quick.db')
https://quickdb.js.org
Full Documentation:What is quick.db?
Quick.db is an easy to use database alternative, it was designed to be simple to let new users who are just getting into development not need to worry about large-scale databases. It works by storing data to a set ID(key), then access that persistent data anytime through a .fetch() function.
You can think of it like a giant persistent JSON object, you can add new items to the object using .set(), & fetch items from the JSON object using .fetch(). The ID in this would be the name of the json object to fetch & set.
Over 240 public programs use Quick.db as a dependent! Source