n3rthusdb
MADE İN TURKEY DATABASE MODÜLÜ
for download
npm install --save n3rthusdb
New Güncelleme 1.0.5
db.push() => Added/Eklendi!
db.unpush() => Added/Eklendi!
====> OLD EXAMPLE
const { Database } = require("n3rthusdb")
const dbOptions = {
"file":"database",
"autoFile": true,
"jsonspaces": 5
}
const db = new Database(dbOptions)
====> NEW EXAMPLE
const { Database } = require("n3rthusdb")
const dbOptions = {
"file":"database",
"autoFile": true,
"jsonspaces": 5
}
const db = new Database(dbOptions)
Hatalar Düzeltildi!
EXAMPLE
db.yaz("veri","belirti")
db.kont('veri')
db.bul("veri")
db.sil("veri")
db.yaz("puan",10)
db.topla("puan",1)
db.çıkar("puan",1)
db.hepsi()
db.sıfırla()
db.has('n3rthus')
db.get("data")
db.push("1",2)
db.unpush("1",2)
db.set("data","symptom")
db.delete("data")
db.backup("data")
db.add("xp",1)
db.remove("xp",1)
db.all()
db.deleteall()
SET CODE
const { Database } = require("n3rthusdb")
const dbOptions = {
"file":"database",
"autoFile": true,
"jsonspaces": 5
}
const db = new Database(dbOptions)
db.set("Data",`Sample`)
console.log(db.get("Data"))
DELETE CODE
const { Database } = require("n3rthusdb")
const dbOptions = {
"file":"database",
"autoFile": true,
"jsonspaces": 5
}
const db = new Database(dbOptions)
db.delete("data")
HAS CODE
const { Database } = require("n3rthusdb")
const dbOptions = {
"file":"database",
"autoFile": true,
"jsonspaces": 5
}
const db = new Database(dbOptions)
if(db.has('n3rthus')){
var n3rthus = db.get('n3rthus')
} else {
var n3rthus = "!"
}
console.log(n3rthus)
GET CODE
const { Database } = require("n3rthusdb")
const dbOptions = {
"file":"database",
"autoFile": true,
"jsonspaces": 5
}
const db = new Database(dbOptions)
console.log(db.get("veri"))
BACKUP CODE
const { Database } = require("n3rthusdb")
const dbOptions = {
"file":"database",
"autoFile": true,
"jsonspaces": 5
}
const db = new Database(dbOptions)
db.backup("veri")
ALL CODE
const { Database } = require("n3rthusdb")
const dbOptions = {
"file":"database",
"autoFile": true,
"jsonspaces": 5
}
const db = new Database(dbOptions)
let all = db.all()
console.log(all)
PUSH CODE
db.push("1",2)
{
"1": [
2
]
}
UNPUSH CODE
db.unpush("1",2)
{
"1": [
2
]
}
{
"1": []
}
DELETEALL CODE
const { Database } = require("n3rthusdb")
const dbOptions = {
"file":"database",
"autoFile": true,
"jsonspaces": 5
}
const db = new Database(dbOptions)
db.deleteall()
ALL CODE
const { Database } = require("n3rthusdb")
const dbOptions = {
"file":"database",
"autoFile": true,
"jsonspaces": 5
}
const db = new Database(dbOptions)
db.add("puan",1)
REMOVE CODE
const { Database } = require("n3rthusdb")
const dbOptions = {
"file":"database",
"autoFile": true,
"jsonspaces": 5
}
const db = new Database(dbOptions)
db.remove("puan",5)