nosqlited
A nosql light database
Last updated 6 years ago by hbouvier .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install nosqlited 
SYNC missed versions from official npm registry.

NoSQLiteD Build Status Coverage Status

Yet another NoSQL implementation

This NoSQL database can be embeded, as a library to your project or started as a REST Service (daemon)

#LICENSE:

This module is licensed under the Apache License v2.0

Usage as a REST Server

npm install -g nosqlited

nosqlited --port=4200

Create MyDatabase

curl -X POST http://localhost:4200/nosqlite/api/v1/MyDatabase

Create MyBucket inside MyDatabase

curl -X POST http://localhost:4200/nosqlite/api/v1/MyDatabase/MyBucket

Create MyKey with a value of {"firstname":"Granny", "lastname":"Smith"}

curl -X PUT -H 'Content-Type: application/json' -d '{"firstname":"Granny", "lastname":"Smith"}' http://localhost:4200/nosqlite/api/v1/MyDatabase/MyKey

Getting back MyKey

curl http://localhost:4200/nosqlite/api/v1/MyDatabase/MyBucket/MyKey

Deleting MyKey

curl -X DELETE http://localhost:4200/nosqlite/api/v1/MyDatabase/MyBucket/MyKey

Deleting the whole Bucket with all the keys inside.

curl -X DELETE http://localhost:4200/nosqlite/api/v1/MyDatabase/MyBucket

Include this as a module in your own project

project.js

var NoSqlite = require('nosqlited');
var db = new NoSqlite("MyDatabase", {level:'debug', journal:false});

db.open().then(function () {
    return db.create('MyBucket');
}).then(function (bucket) {
    return bucket.set('MyKey', {firstname:'Granny', lastname:'Smith'});
}).then(function () {
    return db.bucket('MyBucket').get('MyKey');
}).then(function (document) {
    console.log('document=', document.value);
    return db.close();
}).then(function () {
    console.log('all is well, db closed');
}, function (reason) {
    console.log('ERROR: an error occured when playing with the db. reason=', reason);
}).done();

Current Tags

  • 0.0.11                                ...           latest (6 years ago)

8 Versions

  • 0.0.11                                ...           6 years ago
  • 0.0.9                                ...           6 years ago
  • 0.0.8                                ...           6 years ago
  • 0.0.7                                ...           6 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (7)
Dev Dependencies (5)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |