0.1.6 • Published 11 months ago

mskdb v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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

const MSKDB = require('MSKDB');

const db = new MSKDB({ directory: 'models', #string | default directory to save all your db files extension: 'MSKDB', #string | the database extension name: 'database', #string | the database name backup: false, #beoloen true | false backup_path: 'backup', #string | this is a path to your backup file log: false #beoloen | log results to console });

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

database extension

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

database directory

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

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

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

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

Usage

db.info()

To use this database in your project simply follow this examples

creating new database

db = new MSKDB("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); db.delete(1);

updating a row

db.update(5, { name: "peter", age: 19, profession: "graphics designer" }); db.amend(5, { name: "peter", age: 19, profession: "graphics designer" });

drop database

db.wipe();

search data

db.find({uid: 'random text: 41'});

clone data

db.clone('./test.bson');

0.1.0

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.6

11 months ago

0.1.5

11 months ago

5.0.0

2 years ago

4.1.0

2 years ago

4.2.0

2 years ago

3.2.1

2 years ago

3.1.2

2 years ago

3.2.0

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

2.5.5

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

2.2.5

2 years ago

4.0.0

2 years ago

2.2.4

2 years ago

2.4.5

2 years ago

2.3.5

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.0

4 years ago