mskdb

5.0.0 • Public • Published

mskdb

npm version License

Description

This is a pure json based javascript noqsl database.

Table of Contents

Installation

To install and run the project, follow these steps:

  1. Clone the repository.
   npm i mskdb

## Configuration
This is the basic configuration of the package

```bash
const userDB = new MskJsonDb({
    name: "Users", // the database name
    extention: "db", // the database extension
    directory: "model", // default directory to save all your db files
    backup: false //beoloen true | false
    backup_path: "./bk" // this is a path to your backup file
});

database name

const userDB = new MskJsonDb({
    name: "Users", // the database name
});

database extension

const userDB = new MskJsonDb({
    extention: "db", // the database extension
});


database directory

const userDB = new MskJsonDb({
    directory: "model", // default directory to save all your db files
});

database backup
const userDB = new MskJsonDb({
    backup: false //beoloen true | false
});

when the backup is enable it will automatically save all your file once any chances is made


database backup_path
const userDB = new MskJsonDb({
    backup_path: "./bk" // this is a path to your backup file
});

## Usage

To use this database in your project simply follow this examples


 ```bash

# creating new database
db = new MSK("database name", "database extension")


# deleting existing database
db.format();


# inserting data into the database
db.insert({ name: "peter", age: 19, profession: "Software developer" });


# dropping a row
db.drop(5);


# updating a row
db.update(5, { name: "peter", age: 19, profession: "graphics designer" });

Package Sidebar

Install

npm i mskdb

Weekly Downloads

2

Version

5.0.0

License

MIT

Unpacked Size

9.9 kB

Total Files

4

Last publish

Collaborators

  • mrskillz