node-document-storage

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

NODE-DOCUMENT-STORAGE

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

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

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

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

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

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

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

    storage.exists(['post/1', 'post/2'], function(errres) {
      // console.log(arguments); 
    });
  $ npm install node-document-storage

Local tests:

  $ make test

Released under the MIT license.

Copyright (c) Jonas Grimfelt