sexodb
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published


About

A simple but fast json database you can add values ​​in mongodb with simple methods


Installation

npm i sexodb

Example Usage


JSON Example

const { sexoJson } = require("sexodb")
const db = new sexoJson("database.json")
async function example() {

// Add 1 to the "counter" key
await db.cumAdd("counter");

// Add 5 to the "points" key
await db.cumAdd("points", 5);

// Subtract 1 from the "counter" key
await db.blowjobSubtract("counter");

// List all keys and values in the database
const allData = db.lustAll();
console.log(allData);

// Set the value of the "name" key to "John"
await db.boobsSet("name", "John");

// Get the value of the "points" key
const points = await db.pussyGet<number>("points");
console.log(points);

// Delete the "name" key
await db.assDelete("name");

}

example();

MONGODB Example

const {sexoMongo} = require("sexodb")
const db = new sexoMongo("Name schema")

async function example () {

    //Connecting to MongoDB
    await db.connect("mongodb://localhost/myDatabase")

    // Add 5 to the "points" key
    await db.cumAdd("points", 5);

    // Subtract 1 from the "points" key
    await db.blowjobSubtract("points", 1);

    // List all keys and values in the database
    const allData = await db.lustAll();
    console.log(allData);

    // Get the value of the "points" key
    const points = await db.pussyGet("points");
    console.log(points);

    //Change an existing key
    await db.boobsSet("points", 22);

    // Delete the "points" key
   await db.assDelete("points");
}
example();

Useful Links

Package Sidebar

Install

npm i sexodb

Weekly Downloads

51

Version

3.0.2

License

ISC

Unpacked Size

33.4 kB

Total Files

15

Last publish

Collaborators

  • gui6572bhxjx783