csy.db
v1.5.6
Published
csy.db Databases Advanced features #Every Time forever forward
Downloads
61
Maintainers
Readme
csy.db
Examples:
// Data Set | Get | Add
db.set("KEY", "DATA"); // Change Data And Result Data
db.get("KEY"); // Result Data
db.add("KEY"); // Change Data And Result Data
db.fetch("KEY"); // Result Data
db.push("KEY.KEY", "data"); // Push Datas Json or Array
// Data All
db.all("OPTIONAL MAX DATAS NUMBER"); // All Datas
// Data exists
db.has("KEY"); // True/False
// Data Count
db.size(); // All Data Length
// Created Notification
db.on("create", (datas) => {
console.log(`Created Data Name: "${datas.key}", Value: "${datas.value}"`);
});
// Updated Notification
db.on("update", (datas) => {
console.log(`Updated Data Name: "${datas.key}", Last Value: "${datas.last}", New Value: "${datas.new}"`);
});
// Deleted Notification
db.on("delete", (datas) => {
console.log(`Deleted Data Name: "${datas.key}", Value: "${datas.value}"`);
});
csy.db SERVER
const csydb = require("csy.db");
const db = new csydb.server("URL", "password"); // ({SERVERURL}, {SERVERPASS})
let data = await db.set("firstdata", 15);
let getdata = await db.get("firstdata");
// For More Help Join My Server
Main Data
const db = require("csy.db");
Multiple Data
const csydb = require("csy.db");
const db = new csydb.create("datas.json", 0); // ({PATH}, {MAXDATALIMIT})
Encrypted Data Protection
const csydb = require("csy.db");
const db = new csydb.cipher("datas.json", 0, "SECRET_KEY"); // ({PATH}, {MAXDATALIMIT}, {SECRETKEY})
// All Datas Encrypt
db.encryptAll();
// All Datas Decrypt
db.decryptAll();
Mongodb Shortcut
const csydb = require("csy.db");
const db = new csydb.mongodb("URL"); // ({MONGOURL})
let data = await db.set("firstdata", 15);
let getdata = await db.get("firstdata");
For Support Join Server: https://discord.gg/gkmwaAZQBu