n3rthusdb
TÜRK YAPIMI DATABASE MODÜLÜ
İndirmek İçin
npm install --save n3rthusdb
Yeni Güncelleme 0.0.9
db.all() = db.hepsi() => Eklendi!
====> OLD EXAMPLE
const { Database } = require("n3rthusdb")
const db = new Database("database")
====> NEW EXAMPLE
const { Database } = require("n3rthusdb")
const n3rthusDB = {
"file": "database",
"autoFile": true,
};
const db = new Database(n3rthusDB)
Hatalar Düzeltildi!
Örnek Kodlar
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.set("data","symptom")
db.delete("data")
db.backup("data")
db.add("xp",1)
db.remove("xp",1)
db.all()
db.deleteall()
YAZDIRMA KODU
const { Database } = require("n3rthusdb")
const n3rthusDB = {
"file": "database",
"autoFile": true,
};
const db = new Database(n3rthusDB)
db.yaz("Mesaj",`örnek`)
console.log(db.bul("Mesaj"))
SİLME KODU
const { Database } = require("n3rthusdb")
const n3rthusDB = {
"file": "database",
"autoFile": true,
};
const db = new Database(n3rthusDB)
db.sil("veri")
KONTROL KODU
const { Database } = require("n3rthusdb")
const n3rthusDB = {
"file": "database",
"autoFile": true,
};
const db = new Database(n3rthusDB)
if(db.kont('n3rthus')){
var n3rthus = db.bul('n3rthus')
} else {
var n3rthus = "!"
}
console.log(n3rthus)
BULMA KODU
const { Database } = require("n3rthusdb")
const n3rthusDB = {
"file": "database",
"autoFile": true,
};
const db = new Database(n3rthusDB)
console.log(db.bul("veri"))
YEDEKLE KODU
const { Database } = require("n3rthusdb")
const n3rthusDB = {
"file": "database",
"autoFile": true,
};
const db = new Database(n3rthusDB)
db.yedekle("veri")
HEPSİ KODU
const { Database } = require("n3rthusdb")
const n3rthusDB = {
"file": "database",
"autoFile": true,
};
const db = new Database(n3rthusDB)
let all = db.hepsi()
console.log(all)
SIFIRLA KODU
const { Database } = require("n3rthusdb")
const n3rthusDB = {
"file": "database",
"autoFile": true,
};
const db = new Database(n3rthusDB)
db.sıfırla()
TOPLA/ARTIR KODU
const { Database } = require("n3rthusdb")
const n3rthusDB = {
"file": "database",
"autoFile": true,
};
const db = new Database(n3rthusDB)
db.topla("puan",1)
ÇIKARKODU
const { Database } = require("n3rthusdb")
const n3rthusDB = {
"file": "database",
"autoFile": true,
};
const db = new Database(n3rthusDB)
db.çıkar("puan",5)