Storage adapter interface for `node-document` ODM for Node.js.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.editorconfig
.env
.gitattributes
.gitignore
.jshintignore
.jshintrc
.travis.yml
MIT-LICENSE
Makefile
README.md
index.js
package.json

README.md

NODE-DOCUMENT-STORAGE Build Status

Storage adapter interface for node-document ODM for Node.js.

About

Unified interface for write/read data to/from differen kinds of storages/databases.

Adapters

API

#set

  • (keys, values, [callback(err, res)])

    storage.set(['post/1', 'post/2'], [{foo: 1}, {foo: 2}], function(err, res) {
      // console.log(arguments);
    });
  • (keys_values, [callback(err, res)])

    storage.set({'post/1': {foo: 1}, 'post/2': {foo: 1}}, function(err, res) {
      // console.log(arguments);
    });

#get

  • (keys, [callback(err, res)])

    storage.get(['post/1', 'post/2'], function(err, res) {
      // console.log(arguments);
    });

#del

  • (keys, [callback(err, res)])

    storage.del(['post/1', 'post/2'], function(err, res) {
      // console.log(arguments);
    });

#exists

  • (keys, [callback(err, res)])

    storage.exists(['post/1', 'post/2'], function(err, res) {
      // console.log(arguments);
    });

Installation

  $ npm install node-document-storage

Test

Local tests:

  $ make test

License

Released under the MIT license.

Copyright (c) Jonas Grimfelt

Bitdeli Badge