1.0.0 • Published 2 years ago

simple-pseudo-db v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

It basically writes to files locally, all databases are objects and insertions just set properties on those objects. Really similar to localstorage in browser. This is just something I made for a project. Im not sure how fast, reliable or secure it is but its really easy to use.. Also, Im not sure how it reacts to large data sets.. so I dont recommend using it for large scale projects.

Usage

Install

npm i simple-pseudo-db

Example

const PDBConnection = require("simple-pseudo-db");

let instance = new PDBConnection("osaki", "password");
instance.createDB("new_db");
instance.insert("new_db", "key", "value");
instance.insert("new_db", "new_key", "new value");
console.log(instance.readDB("new_db"));

Output:

{ 
    key: 'value', 
    new_key: 'new value' 
}

Functions

createDB (db_name) -> void
readDB (db_name) -> object
deleteDB (db_name) -> void

insert (db_name, key, value) -> void
update (db_name, key, new_value) -> void
delete (db_name, key) -> void
query (db_name, key) -> value
includes (db_name, key) -> boolean

Todo:

  • Better Docs
  • Ability to delete User

Useful:

DB files are located in $HOME/.pseudo-db

1.0.0

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago