https://github.com/couragecowardlydog/jsonbase
File based key-value database using node's stream api
https://github.com/couragecowardlydog/jsonbase
caching databas javascript json json-database key-value nodejs streams
Last synced: about 1 month ago
JSON representation
File based key-value database using node's stream api
- Host: GitHub
- URL: https://github.com/couragecowardlydog/jsonbase
- Owner: couragecowardlydog
- Created: 2019-12-27T13:32:39.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-30T17:12:34.000Z (almost 6 years ago)
- Last Synced: 2025-03-17T02:45:58.359Z (7 months ago)
- Topics: caching, databas, javascript, json, json-database, key-value, nodejs, streams
- Language: JavaScript
- Homepage:
- Size: 3.33 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Key Value Store
Read any huge file , supports more the node's heap size
Update : Caching will be added in next update , to reduce read operation on disk
## Installation
Install package directly fom npm ,
```shell
npm install jsonbase-store
```#### Intialize store
Either specify file path or new file will be created in current working directory
```js
var store = require('jsonbase-store')('./db');
```#### Insert
```js
await store.insert("1", { 'key' : 'value' },1000);
```#### Update
```js
await store.update("1", { 'key' : 'value' });
```#### Select
```js
await store.update("1");
```#### Delete
```js
await store.update("1");
```