QDB3
JSON Data Mangement
From this release onwards, we will backport features from v4 and start to migrate to SQL (with JSON support).
QDB is a high level data management for storing local JavaScript Objects without corruptions. Connect to multiple JSON files, use connection pooling, edit data directly or use QDB's built-in functions.
Main Features
Links
Main Import
npm install qdatabase
const QDB = require("qdatabase");
const MyDB = new QDB.Connection("./Data/Databases.json");
Database Usage
The below example allows for debug logging, connects to a database ./Databases/Users.json
and sets an object in the database.
process.on("QDB-Debug", n => console.log(n));
const QDB = require("qdatabase");
const MyDB = new QDB.Connection("./Databases/Users.json", {
Polling: true
});
MyDB.Set({User: "Smally", Job: "Software Engineer"});
The following example connects to a folder ./Databases/
of database files automatically using a pool.
const QDB = require("qdatabase");
const DBS = new QDB.Pool("./Databases/");
DBS.Select("Users").Fetch("User");
DBS.Select("Jobs").Append("Full-Stack Developer");
Utility Usage
Check out the base utility repository here.
Cache
A Collection with extended custom caching features.
const Cache = new QDB.Cache();
Cache.set(Cache.id, 872639);
Cache.increment(0);
Cache.decrement(1);
Cache.add(2, 5);
Cache.subtract(3, 5);
Cache.multiply(4, 3);
Cache.divide(5, 3);
Cache.square(6);
Cache.power(7, 4);
Cache.root(8);
Cache.exp(9);
Cache.absolute(10);
Cache.accumulate(4, (Val, Key, Self) => {
return (Val + 10) * 3;
});
Stack
A manager for temporarily storing mass data in sequence.
const Stack = new QDB.Stack(DataStream);
Stack.Seek(3);
Bug/Issues/Features
If you have found a bug, want to suggest a feature or need help with QDB, please contact me at Discord with the tag QSmally#3594
. On the other hand, if you would like to join the server, the invite link can be found at our site. You can also subject an issue on the Github repo.
Contributing
This module is licensed under MIT. Feel free to contribute by forking the repository, or cloning the master branch for in-progress features.