GithubHelp home page GithubHelp logo

wextys / five.db Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 0 B

five.db Diğer Veritabanı Modülleriyle Oynanmış Olan Veritabanı Modülüdür SQLite Ve BSON Veritabanlarını İçinde Bulundurur.

License: MIT License

JavaScript 100.00%

five.db's Introduction

five.db Nedir?

five.db Diğer Veritabanı Modülleriyle Oynanmış Olan Veritabanı Modülüdür SQLite Ve BSON Veritabanlarını İçinde Bulundurur.

Nasıl Kurulur?

five.db Modülünü Kurmak İçin Bir Konsol Açın Ve Aşşağıdaki Kodu Yazın.

> npm i five.db@latest

Kurulumdan Sonra Modülü Hangi Veritabanı Stilinde Kullanıcağınızı Seçin.

SQLite Formatı İçin;

const db = require("five.db").sqlite();

BSON Formatı İçin;

const db = require("five.db").bson();

Paket Otomatikmen five.db Dosyası Oluşturacaktır.

Örnek Kullanım

const db = require("five.db").sqlite();
const client = require("discord.js");

client.on("messageCreate", async (message) => {

  if(message.content.includes("!sistem-aç")){

   db.set("saas",true); // 'saas' İsminde Veri Oluşturup Ona 'true' Değerini Veriyoruz
   message.reply("Sistem Başarıyla Açıldı.")

  }else if(message.content.includes("!sistem-kapat")){

   db.set("saas",false); // 'saas' İsmindeki Verimizi 'false' Değeriyle Değiştiriyoruz
   message.reply("Sistem Başarıyla Kapatıldı.")

  }else{

  let kontrol = await db.get("saas"); // 'saas' İsmindeki Verimizin Kayıtlı Olan Değerlerini Alıyoruz
  // Ve Verimizi kontrol Olarak Tanımlıyoruz
  
    if (kontrol == true) { // kontrol(Aldığımız Veri) 'true' Değerine Eşit İse Devam Ettir
    if (message.content.toLowerCase() === "sa"){
      message.reply("Aleyküm Selam.");
    }
  }
}
});

Nasıl Kullanılır / Fonksiyonlar Nelerdir?

Veri Kaydetme / Ayarlama

  db.set("beş", "5") // true ~ "5"

Veri Çağırma / Alma

  db.get("beş") // "5"
  db.all() // [{ ID: "beş", value: "5" }]

Array İşlemleri

    db.push("beş", ["5", "10"]) // ["5", "10"]
    db.pull("beş", "5") // ["10"]

Veri Kontrolü

   db.has("beş") // 'true' veya 'false'

Veri Toplama / Çıkarma

    db.add("deneme", 35) // +35
    db.sub("deneme", 30) // -30 | 35 - 30 = 5

Veri Silme / Sıfırlama

    db.delete('beş') // Belirtilen Veriyi Siler
    db.deleteValue("5") // Veriler Arasından Belirtilen Değerdeki Verileri Siler
    db.deleteAll() // Bütün Verileri Siler / Format

Destek & İletişim

Discord Presence Discord Presence

five.db's People

Contributors

bes-js avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.