Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xeaone/mpdb
Mpdb
https://github.com/xeaone/mpdb
Last synced: 2 days ago
JSON representation
Mpdb
- Host: GitHub
- URL: https://github.com/xeaone/mpdb
- Owner: xeaone
- License: mpl-2.0
- Created: 2017-01-02T23:05:56.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-07T23:18:25.000Z (over 6 years ago)
- Last Synced: 2024-10-11T22:13:04.032Z (about 1 month ago)
- Language: JavaScript
- Size: 36.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mpdb
A persistent in memory database. A database that is kept in memory and immediately persistent.
## Install
`npm install mpdb --save`## API
### Mpdb
A initializes the files and directories. Collections are loaded annd kept in memory on demand. The data is stored in a json format.- `options: Object`
- `name: String` The name of the database. Default is `'default'`.
- `sync: String` Initalize sync or async. Default is `false`.
- `path: String` The path to the persistent data. Default is `~/{username}/.mpdb/.`### Mpdb.findAll
- Returns `Promise`### Mpdb.findOne
- Returns `Promise`### Mpdb.removeAll
- Returns `Promise`### Mpdb.removeOne
- Returns `Promise`### Mpdb.updateAll
- Returns `Promise`### Mpdb.updateOne
- Returns `Promise`### Mpdb.insertAll
- Returns `Promise`### Mpdb.insertOne
- Returns `Promise`### Mpdb.collection
- Returns `Promise`### Mpdb.collectionLoad
- Returns `Promise`### Mpdb.collectionSave
- Returns `Promise`### Mpdb.collectionPath