electus-db

    5.0.1 • Public • Published

    Image Image

    Image

    Yüklemek İçin

    npm install electus-db
    

    Yeni Özellikler

    Json, Sql, Yaml, Desteği Getirildi


    Buglar Ve Hatalar Fixlendi

    Nasıl Kullanılır? 💫

    JS Sql

    const Database = require("../lib/index");
    const db = new Database.Sql();
    
    // Set data
    db.set("Hello", "World");
    
    // Get data
    db.get("Hello"); // World
    db.fetch("Hello"); // World
    
    // Delete data
    db.delete("Hello");
    
    db.get("Hello"); // undefined
    db.has("Hello"); // false
    
    db.set("age", 10);
    db.add("age", 1); // 11
    db.subtract("age", 9); // 2
    
    db.set("array", [ "apple" ]);
    db.push("array", "orange"); // [ "apple", "orange" ]
    
    // Clear data
    db.deleteAll();
    
    // Get all the data
    db.all();



    JS Mongo

    const Database = require("../lib/index");
    const db = new Database.Mongo("mongodb://localhost/electusdb");
    async function hello() {
    // Set data
    await db.set("Hello", "World");
    
    // Get data
    await db.get("Hello"); // World
    await db.fetch("Hello"); // World
    
    // Delete data
    await db.delete("Hello");
    
    await db.get("Hello"); // undefined
    await db.has("Hello"); // false
    
    await db.set("age", 10);
    await db.add("age", 1); // 11
    await db.subtract("age", 9); // 2
    
    await db.set("array", [ "apple" ]);
    await db.push("array", "orange"); // [ "apple", "orange" ]
    
    // Clear data
    await db.deleteAll();
    
    // Get all the data
    await db.all();
    };
    hello();



    JS Yaml

    const Database = require("../lib/index");
    const db = new Database.Yaml();
    
    // Set data
    db.set("Hello", "World");
    
    // Get data
    db.get("Hello"); // World
    db.fetch("Hello"); // World
    
    // Delete data
    db.delete("Hello");
    
    db.get("Hello"); // undefined
    db.has("Hello"); // false
    
    db.set("age", 10);
    db.add("age", 1); // 11
    db.subtract("age", 9); // 2
    
    db.set("array", [ "apple" ]);
    db.push("array", "orange"); // [ "apple", "orange" ]
    
    // Clear data
    db.deleteAll();
    
    // Get all the data
    db.all();



    JS Json

    const Database = require("../lib/index");
    const db = new Database.Json();
    
    // Set data
    db.set("Hello", "World");
    
    // Get data
    db.get("Hello"); // World
    db.fetch("Hello"); // World
    
    // Delete data
    db.delete("Hello");
    
    db.get("Hello"); // undefined
    db.has("Hello"); // false
    
    db.set("age", 10);
    db.add("age", 1); // 11
    db.subtract("age", 9); // 2
    
    db.set("array", [ "apple" ]);
    db.push("array", "orange"); // [ "apple", "orange" ]
    
    // Clear data
    db.deleteAll();
    
    // Get all the data
    db.all();

    Bana Ulaşabiliceğiniz Yerler & Destek Ve Yardım & Bug Hata Bildirim!

    Discord

    Install

    npm i electus-db

    DownloadsWeekly Downloads

    20

    Version

    5.0.1

    License

    MIT

    Unpacked Size

    10.4 kB

    Total Files

    8

    Last publish

    Collaborators

    • mert..1010