CroxyDB
What's new in 0.0.10?
Examples
Moving Data From Quick.DB
const db = require("croxydb");
const quickdb = require("quick.db");
db.move(quickdb)
Example
const db = require("croxydb")
db.set("x.y.z", "abc")
db.get("x")
db.fetch("x")
db.all()
db.push("a", "hello")
db.push("a", "world")
db.unpush("a", "hello")
db.push("b", {test: "croxydb"})
db.push("b", {test2: "croxydb2"})
db.delByPriority("b", 1)
db.setByPriority("b", {newtest:"hey this is edited"}, 1)
db.has("x")
db.delete("x")
db.deleteAll()
MongoDB Support (It is new feature, if you find any bugs join my Discord)
const db = require("croxydb")
db.setAdapter("mongo",
{
url: "Your Mongo URL",
schema: "Schema"
})
db.set("x", "abc")
db.get("x")
db.fetch("x")
db.all()
db.push("a", "hello")
db.push("a", "world")
db.unpush("a", "hello")
db.push("b", {test: "croxydb"})
db.push("b", {test2: "croxydb2"})
db.delByPriority("b", 1)
db.setByPriority("b", {newtest:"hey this is edited"}, 1)
db.has("x")
db.delete("x")
db.deleteAll()
Example With Options
const db = require("croxydb")
db.setReadable(true)
db.noBlankData(true)
db.setAdapter("yamldb")
db.setFolder("folder")
db.setFile("db")
db.set("x.y.z", "abc")
db.get("x")
db.fetch("x")
db.all()
db.push("a", "hello")
db.push("a", "world")
db.unpush("a", "hello")
db.push("b", {test: "croxydb"})
db.push("b", {test2: "croxydb2"})
db.delByPriority("b", 1)
db.setByPriority("b", {newtest:"hey this is edited"}, 1)
db.has("x")
db.delete("x")
db.deleteAll()
If you've any question, you can join to my Discord server: Click me!