Storage adapter interface for node-document ODM for Node.js.
Unified interface for write/read data to/from differen kinds of storages/databases.
- Global Memory
- FS FileSystem
- NStore Memory/File/Process
- Memcached
- Redis
- KyotoCabinet
- MongoDB
- CouchDB
- Riak
- ElasticSearch
- AmazonS3
-
(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); });
-
(keys, [callback(err, res)])
storage.get(['post/1', 'post/2'], function(err, res) { // console.log(arguments); });
-
(keys, [callback(err, res)])
storage.del(['post/1', 'post/2'], function(err, res) { // console.log(arguments); });
-
(keys, [callback(err, res)])
storage.exists(['post/1', 'post/2'], function(err, res) { // console.log(arguments); });
$ npm install node-document-storage
Local tests:
$ make test
Released under the MIT license.
Copyright (c) Jonas Grimfelt