Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/foxfirecodes/xpdb
Ultra-fast persistent database solution with a simple to use API
https://github.com/foxfirecodes/xpdb
Last synced: 5 days ago
JSON representation
Ultra-fast persistent database solution with a simple to use API
- Host: GitHub
- URL: https://github.com/foxfirecodes/xpdb
- Owner: foxfirecodes
- Created: 2017-02-20T23:43:07.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-22T01:28:02.000Z (about 1 year ago)
- Last Synced: 2024-12-25T05:21:19.390Z (12 days ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# XPDB
> Ultra-fast persistent database solution with a simple to use API
XPDB is a hyper-simplified wrapper around [level](https://github.com/Level/level), which is a wrapper around [LevelUP](https://github.com/rvagg/node-levelup), which is a wrapper around [LevelDB](https://github.com/google/leveldb). Sounds complicated, right? Nope.
**XPDB** is a super easy to use database system that is just like using a Map. Data is stored persistently, quickly, and all methods use `Promise`s, which means you can use it with the fancy new `async`/`await` features! It can store any kind of data, including `JSON`.
## Installation
```bash
npm install --save xpdb
```## Usage
```javascript
var XPDB = require("xpdb");
var db = new XPDB("./myDB");// Promises
db.put("some.key", "Hello world!")
.then(() => {
db.get("some.key")
.then((value) => {
console.log(value);
// => Hello world!
})
.catch(console.error);
})
.catch(console.error);// async/await
try {
await db.put("some.key", "Hello world!");
console.log(await db.get("some.key"));
// => Hello world!
} catch (err) {
console.error(err);
}
```## Methods
> _Coming soon, for now there are JavaDocs, and it should be pretty self-explanatory._