JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q36929F
  • License MIT

✨ JSON, MongoDb, YAML, SQL Veri Tabanlı Database Modülü.

Package Exports

  • coverage.db
  • coverage.db/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (coverage.db) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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