{"_id":"simpledb","_rev":"26-91fa3e0c1e65c96c0cd8cbb88a18a1f9","name":"simpledb","description":"An Amazon AWS SimpleDB library for Node.js that is user-friendly and fault-tolerant","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"simpledb","description":"A SimpleDB library for Node.js that is user-friendly and fault-tolerant","keywords":["amazon","aws","simpledb","database","wrapper","api"],"version":"0.0.1","homepage":"https://github.com/rjrodger/simpledb","author":{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},"contributors":[{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"}],"dependencies":{"aws-lib":"*"},"main":"lib/simpledb","directories":{"lib":"lib"},"repository":{"type":"git","url":"https://github.com/rjrodger/simpledb.git"},"engines":{"node":"*"},"_id":"simpledb@0.0.1","_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.3.5","dist":{"shasum":"7cda3c5d0269c0ee420e951b6b28bce33b9a0d13","tarball":"https://registry.npmjs.org/simpledb/-/simpledb-0.0.1.tgz","integrity":"sha512-7XvFl3KnC0CtkU6mIYQ/nkGJpddpZTe5wjrEQ3FwmBsIwNL/qNVQP7dJhfxy5DguLABSzKxKmvdcbMgunN4C7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDjX6dJsjuce6XpFyDgEvmhkmahQBds+8rmlCrgDZb3ZAiB18BNKlQf4wTI5xAXNsLoSjj19S3eCNFScqUeZWV1KaQ=="}]}},"0.0.2":{"name":"simpledb","description":"An Amazon AWS SimpleDB library for Node.js that is user-friendly and fault-tolerant","keywords":["amazon","aws","simpledb","database","wrapper","api"],"version":"0.0.2","homepage":"https://github.com/rjrodger/simpledb","author":{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},"contributors":[{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"}],"dependencies":{"aws-lib":">0.0.1"},"main":"lib/simpledb","directories":{"lib":"lib"},"repository":{"type":"git","url":"https://github.com/rjrodger/simpledb.git"},"engines":{"node":"*"},"_id":"simpledb@0.0.2","_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.3.5","dist":{"shasum":"62327f9ce57c1de713b4c1b720d0774b23a22260","tarball":"https://registry.npmjs.org/simpledb/-/simpledb-0.0.2.tgz","integrity":"sha512-zKvBrICVnpX5i0fUVSGjwH9+GsBLpcO/IOc0csr9qrrdO42Wg52a/lpOe0ITvQDfrDKQZR5WYHwweN2cumsSIw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSf2mNgDEDzgvQm4mgNOX4GYGi3i3zV+hdyKMU2p0jiAIgWUsfTLqGdxOEFlxZ03GBNxMacb+DocTcI94RV6pXW1A="}]}},"0.0.3":{"name":"simpledb","description":"An Amazon AWS SimpleDB library for Node.js that is user-friendly and fault-tolerant","keywords":["amazon","aws","simpledb","database","wrapper","api"],"version":"0.0.3","homepage":"https://github.com/rjrodger/simpledb","author":{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},"contributors":[{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"}],"dependencies":{"aws-lib":">0.0.1"},"main":"lib/simpledb","directories":{"lib":"lib"},"repository":{"type":"git","url":"https://github.com/rjrodger/simpledb.git"},"engines":{"node":"*"},"_id":"simpledb@0.0.3","_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.2.6","dist":{"shasum":"87d910aa24a047a83bee7aa1bcbb93fd9ff45bfe","tarball":"https://registry.npmjs.org/simpledb/-/simpledb-0.0.3.tgz","integrity":"sha512-SZ95d5KmA/LrDgo2j6WrKWceHhc8Mww8MlNY8EcU4n2UXptujVqrW56aNxJe5eHUkrMV2ZY3pO60o7J5dn0xtw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtwbonuV1wbai1I/hNwVtFJ+2QJEHwm1aqE5zQC7mp0AIhAI15DYt9JYNiBE2gKvnj92bVVMi00R5iKx7C+vBjSn0z"}]}},"0.0.4":{"name":"simpledb","description":"An Amazon AWS SimpleDB library for Node.js that is user-friendly and fault-tolerant","keywords":["amazon","aws","simpledb","database","wrapper","api"],"version":"0.0.4","homepage":"https://github.com/rjrodger/simpledb","author":{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},"contributors":[{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"}],"dependencies":{"aws-lib":">0.0.1"},"main":"lib/simpledb","directories":{"lib":"lib"},"repository":{"type":"git","url":"https://github.com/rjrodger/simpledb.git"},"engines":{"node":"*"},"_id":"simpledb@0.0.4","_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.4.1","dist":{"shasum":"d884b6ddab36b9b740cb677758f0e1a8043e853e","tarball":"https://registry.npmjs.org/simpledb/-/simpledb-0.0.4.tgz","integrity":"sha512-CCXNkC9nCbO9UO8wbhD6dwuPF9o6/NENQp6YBAIkBZKe2ZVObsIoEyjE+vmdY/Sg+XNxjWmLi6v2+5zEVCp9Bg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEaqOJAOaTu9+7QZYE25Narop2+W2oxoXNKFp/YYt35OAiEAiSo0tTAMoTQ5zEM/ldvoj/nOkshWLpDYWg/jevlcelc="}]}},"0.0.5":{"name":"simpledb","description":"An Amazon AWS SimpleDB library for Node.js that is user-friendly and fault-tolerant","keywords":["amazon","aws","simpledb","database","wrapper","api"],"version":"0.0.5","homepage":"https://github.com/rjrodger/simpledb","author":{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},"contributors":[{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"}],"dependencies":{"aws-lib":">0.0.1"},"main":"lib/simpledb","directories":{"lib":"lib"},"repository":{"type":"git","url":"git://github.com/rjrodger/simpledb.git"},"engines":{"node":"*"},"_id":"simpledb@0.0.5","_engineSupported":true,"_npmVersion":"0.3.13","_nodeVersion":"v0.4.1","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"834c75c98321c35581822f7a3325ea4d2e231c31","tarball":"https://registry.npmjs.org/simpledb/-/simpledb-0.0.5.tgz","integrity":"sha512-Q15K5SnCadTR8tVyH0JfoS5QcHXIuWOipenPpYGaUEQVfyr2Q3rKzESbfipXqJUU3j5Mc9+YGYOZs0H0Vq7mEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEDh42OG50JR84hRGI2J3Ybmv8YhzjCQUXgJqYNqJtJmAiAx8vesHD96KnIibALE2pIqb/qC9W5lwVU/F0trLbynQA=="}]}},"0.0.6":{"name":"simpledb","description":"An Amazon AWS SimpleDB library for Node.js that is user-friendly and fault-tolerant","keywords":["amazon","aws","simpledb","database","wrapper","api"],"version":"0.0.6","homepage":"https://github.com/rjrodger/simpledb","author":{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},"contributors":[{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"}],"dependencies":{"aws-lib":">0.0.1"},"main":"lib/simpledb","directories":{"lib":"lib"},"repository":{"type":"git","url":"git://github.com/rjrodger/simpledb.git"},"engines":{"node":"*"},"_id":"simpledb@0.0.6","_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.4","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"7559a8ca3bd400389d9e4c3588fe998af11a339c","tarball":"https://registry.npmjs.org/simpledb/-/simpledb-0.0.6.tgz","integrity":"sha512-M+X8zFuvVYlK+8gX9XOPF2SYd2g0XCEs4UrtCVl8oRMkiDHVknWf2rjQoNtVWeb9y9TigrV2S+AG40TFrt6kGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzENaFe4AfM3KuV+L3GYVG6QmnOdm2oW23BmlMiHAgrAIhAM3GfVpcvOQTHNFKzwI4zzBl3c46SexMMjxD3vZkUTEn"}]}},"0.0.7":{"name":"simpledb","description":"An Amazon AWS SimpleDB library for Node.js that is user-friendly and fault-tolerant","keywords":["amazon","aws","simpledb","database","wrapper","api"],"version":"0.0.7","homepage":"https://github.com/rjrodger/simpledb","author":{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},"contributors":[{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},{"name":"John Roberts","email":"jroberts@logitech.com"}],"dependencies":{"aws-lib":">0.0.1"},"main":"lib/simpledb","directories":{"lib":"lib"},"repository":{"type":"git","url":"git://github.com/rjrodger/simpledb.git"},"engines":{"node":"*"},"_npmUser":{"name":"rjrodger","email":"richard@ricebridge.com"},"_id":"simpledb@0.0.7","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.103","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"66f0f08f41c5aa6fe0b86c06b0434f36ef7e6390","tarball":"https://registry.npmjs.org/simpledb/-/simpledb-0.0.7.tgz","integrity":"sha512-IQ/ygkpsHuMN3WVaieHIFhYqg6BGT9bqyjMfAZJ/SjHz5BMTel2tAhxWH9AbCPQWJv+EptH0lBZ8eJFeG3fCCQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE9KC/diSHpHK9egsg4ljZprLEqeATBM3z9tYAhOvbXTAiAagho6Bdo957MC7ULlH+IbczY70e7/fCNQHJgDvTuAmA=="}]},"scripts":{},"maintainers":[{"name":"rjrodger","email":"richard@ricebridge.com"}]},"0.0.8":{"name":"simpledb","description":"An Amazon AWS SimpleDB library for Node.js that is user-friendly and fault-tolerant","keywords":["amazon","aws","simpledb","database","wrapper","api"],"version":"0.0.8","homepage":"https://github.com/rjrodger/simpledb","author":{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},"contributors":[{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},{"name":"John Roberts","email":"jroberts@logitech.com"}],"dependencies":{"aws-lib":"0.0.5"},"main":"lib/simpledb","directories":{"lib":"lib"},"repository":{"type":"git","url":"git://github.com/rjrodger/simpledb.git"},"engines":{"node":"*"},"_npmUser":{"name":"rjrodger","email":"richard@ricebridge.com"},"_id":"simpledb@0.0.8","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"bc5da09aa40dbcdcd617ffaaf3f757672d96dc53","tarball":"https://registry.npmjs.org/simpledb/-/simpledb-0.0.8.tgz","integrity":"sha512-0trl375zjwEi/RTnKx9dwgxDKNYNKlRXuO6sTL+fEUs5dx1GdmqhepOUEdXjJRFFlDUuf4JnZxH5EYgxgZ54kg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICPIEWOxF2Kc9CwKeDEuBjBxqr2xUQbU7YtqcmoInslHAiAwIVt3Rt9GAson9Ht3u596cL9AtUvjdZ9Pu+7WUcIVpw=="}]},"scripts":{},"maintainers":[{"name":"rjrodger","email":"richard@ricebridge.com"}]},"0.0.9":{"name":"simpledb","description":"An Amazon AWS SimpleDB library for Node.js that is user-friendly and fault-tolerant","keywords":["amazon","aws","simpledb","database","wrapper","api"],"version":"0.0.9","homepage":"https://github.com/rjrodger/simpledb","author":{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},"contributors":[{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},{"name":"John Roberts","email":"jroberts@logitech.com"},{"name":"Makis Tracend","email":"makis@makesit.es","url":"http://makesites.org/"}],"dependencies":{"aws-lib":"0.0.5"},"main":"lib/simpledb","directories":{"lib":"lib"},"repository":{"type":"git","url":"https://github.com/rjrodger/simpledb.git"},"engines":{"node":"*"},"devDependencies":{"nid":"~0.3.0"},"_id":"simpledb@0.0.9","dist":{"shasum":"4a96791b77c563205f5acdd091c8817b3b5f01b3","tarball":"https://registry.npmjs.org/simpledb/-/simpledb-0.0.9.tgz","integrity":"sha512-I9wFG7ZwTgbaf9ePjJqoCCPkDAiE7OinFDej+Ohev36J67rHhKV9+ElIGlpQLTgm6U+oMJoxDk7KQ0viUyOwbA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBRRhHG0hxFMwv1fDYWiP8bk20GqfTTVLupaTMa6vM1TAiBs1bm39ud549mTIBxsCauT9CmURfzvJglf35kr/nUZug=="}]},"_npmVersion":"1.1.71","_npmUser":{"name":"tracend","email":"makis.tracend@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard@ricebridge.com"},{"name":"tracend","email":"makis.tracend@gmail.com"}]},"0.1.0":{"name":"simpledb","description":"An Amazon AWS SimpleDB library for Node.js that is user-friendly and fault-tolerant","keywords":["amazon","aws","simpledb","database","wrapper","api"],"version":"0.1.0","homepage":"https://github.com/rjrodger/simpledb","author":{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},"contributors":[{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},{"name":"John Roberts","email":"jroberts@logitech.com"},{"name":"Makis Tracend","email":"makis@makesit.es","url":"http://makesites.org/"}],"dependencies":{"aws-lib":"0.3.0"},"main":"lib/simpledb","directories":{"lib":"lib"},"repository":{"type":"git","url":"https://github.com/rjrodger/simpledb.git"},"engines":{"node":"*"},"devDependencies":{"nid":"~0.3.0"},"_id":"simpledb@0.1.0","dist":{"shasum":"7cf670ebe2146c1d2c831abb29c147c22cbaaf98","tarball":"https://registry.npmjs.org/simpledb/-/simpledb-0.1.0.tgz","integrity":"sha512-YzRN4sGyVVuW//JiyWWE2V5lFdxryGgGfwEucaIDkku4hFF6W8hbnV6Lud5t1JDIyNM1ymIqiCiDtelPhG3Erw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCV5KZWD9cQ464v6J195fOrItvge2bxVy4kg2Z2y/aSZgIgJcIvEnu/n9Mk3g8hvRxoyqTFt+ZIx54Ub/eGqusRD9I="}]},"_npmVersion":"1.1.71","_npmUser":{"name":"tracend","email":"makis.tracend@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard@ricebridge.com"},{"name":"tracend","email":"makis.tracend@gmail.com"}]},"0.2.0":{"name":"simpledb","description":"An Amazon AWS SimpleDB library for Node.js that is user-friendly and fault-tolerant","keywords":["amazon","aws","simpledb","database","wrapper","api"],"version":"0.2.0","homepage":"https://github.com/rjrodger/simpledb","author":{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},"contributors":[{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},{"name":"John Roberts","email":"jroberts@logitech.com"},{"name":"Makis Tracend","email":"makis@makesit.es","url":"http://makesites.org/"}],"dependencies":{"aws-lib":"0.3.0"},"main":"lib/simpledb","directories":{"lib":"lib"},"repository":{"type":"git","url":"git+https://github.com/rjrodger/simpledb.git"},"engines":{"node":"*"},"devDependencies":{"nid":"~0.3.0"},"gitHead":"908d911c45808a2d3e1b3fae1f1bf0645f1545e5","bugs":{"url":"https://github.com/rjrodger/simpledb/issues"},"_id":"simpledb@0.2.0","scripts":{},"_shasum":"1145f13eee30d1d555f1fa2f7edbc3094a3a1d82","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"tracend","email":"makis.tracend@gmail.com"},"dist":{"shasum":"1145f13eee30d1d555f1fa2f7edbc3094a3a1d82","tarball":"https://registry.npmjs.org/simpledb/-/simpledb-0.2.0.tgz","integrity":"sha512-ICemXiRp8yNTdZinuF/cEi2niMnNzc5uQ3RSnrObScbvcEOzDv/sWQ2NKCBHwMrd6hiyvDEGd8XGnfmmumu/vw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDEqdE2Oekyh0Ygm95NNRMBq6q/566pzcXNMgubgfL3/AiEAxEqdHicvoRn0cwJzuYWAbzfpDfnU6EqH5r04ESp1VkE="}]},"maintainers":[{"name":"rjrodger","email":"richard@ricebridge.com"},{"name":"tracend","email":"makis.tracend@gmail.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/simpledb-0.2.0.tgz_1454910535905_0.6037343433126807"}}},"maintainers":[{"name":"rjrodger","email":"richard@ricebridge.com"},{"name":"tracend","email":"makis.tracend@gmail.com"}],"time":{"modified":"2022-06-26T20:00:54.931Z","created":"2011-01-22T02:36:00.214Z","0.0.1":"2011-01-22T02:36:00.617Z","0.0.2":"2011-01-25T01:41:42.289Z","0.0.3":"2011-01-25T20:53:42.174Z","0.0.4":"2011-02-22T23:41:15.642Z","0.0.5":"2011-03-03T23:46:11.646Z","0.0.6":"2011-04-09T17:09:04.466Z","0.0.7":"2011-11-01T12:33:55.240Z","0.0.8":"2012-04-06T20:50:31.292Z","0.0.9":"2013-06-11T07:40:07.084Z","0.1.0":"2013-12-10T11:08:19.127Z","0.2.0":"2016-02-08T05:48:56.826Z"},"author":{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},"repository":{"type":"git","url":"git+https://github.com/rjrodger/simpledb.git"},"users":{"rjrodger":true},"readme":"# simpledb\n\nIf you're using this library, feel free to contact me on twitter if you have any questions! :) [@rjrodger](http://twitter.com/rjrodger)\n\nNOTE: this project follows the [Open-Open](https://github.com/rvagg/node-levelup/blob/master/CONTRIBUTING.md) policy - if you submit a pull request or an issue, you get commit rights, so feel free to merge yourself after asking for feedback from the other contribs.\n\nIMPORTANT: YOUR CODE CONTRIBUTIONS (if any) ARE MADE UNDER THE MIT LICENSE. By submitting a pull request or issue you indicate agreement with this condition.\n\nPlease open an issue to indicate a release should be published to NPM, and we can discuss.\n\n\n\nCurrent Version: 0.2.0\n\nTested on: node 0.12.4\n\nA user-friendly **fault-tolerant** library for Amazon AWS SimpleDB access. The core\nSimpleDB actions are mapped to functions:\n\n    var simpledb = require('simpledb')\n    var sdb      = new simpledb.SimpleDB({keyid:'YOUR_AWS_KEY_ID',secret:'YOUR_AWS_SECRET_KEY'})\n\n    sdb.createDomain( 'yourdomain', function( error ) {\n\n      sdb.putItem('yourdomain', 'item1', {attr1:'one', attr2:'two'}, function( error ) {\n\n        sdb.getItem('yourdomain', 'item1', function( error, result ) {\n          console.log( 'attr1 = '+result.attr1 )\n          console.log( 'attr2 = '+result.attr2 )\n        })\n      })\n    })\n\n**Any given SimpleDB request has a non-trivial chance of failing. This\nlibrary implements the exponential back-off retry algorithm as\nrecommended in the SimpleDB developer guide.**\n\nThis library depends on the excellent aws-lib module: [aws-lib](https://github.com/mirkok/aws-lib)\n\nKey Features:\n\n   * simple API\n   * fully configurable\n   * detailed logging\n   * all request attributes can be overridden\n   * fully tested\n\nCore Functions:\n\n   * createDomain     (_\"CreateDomain\"_)\n   * domainMetadata   (_\"DomainMetadata\"_)\n   * listDomains      (_\"ListDomains\"_)\n   * deleteDomain     (_\"DeleteDomain\"_)\n   * putItem          (_\"PutAttributes\"_)\n   * batchPutItem     (_\"BatchPutAttributes\"_)\n   * batchDeleteItem  (_\"BatchDeleteAttributes\"_)\n   * getItem          (_\"GetAttributes\"_)\n   * deleteItem       (_\"DeleteAttributes\"_)\n   * select           (_\"Select\"_)\n   * request          (any action)\n\nThis is still an early version so there's probably some wierdness - use at your risk.\nSecure connections are not supported on node 0.3.x.\n\n\n## Installation\n\n    npm install simpledb\n\nAnd in your code:\n\n    var simpledb = require('simpledb')\n\nOr clone the git repository:\n    git clone git://github.com/rjrodger/simpledb.git\n\nThe simpledb module depends on the [aws-lib](https://github.com/mirkok/aws-lib) module. npm will install this automatically.\n\n\n## Usage\n\nThis module uses the node.js-style callback convention. All functions take\na callback function as their last argument. This callback function should accept three arguments:\n\n    callback( error, result, meta )\n\nWhere error is an object `({Code:'...',Message:'...'})` describing any errors that occured. If the\nfunction was successful then _error_ is _null_.\n\nSo, you check if _error_ is _null_ to see if you can continue working:\n\n    sdb.listDomains( function( error, result, meta ) {\n      if( error ) {\n        console.log('listDomains failed: '+error.Message )\n      }\n      else {\n        // do stuff with result, an array of domain names\n      }\n    })\n\nThe _result_ parameter contains the results of a successful action and\nwhat the _result_ parameter is depends on the action. It could be a string, an array or\nan object.\n\nThe _meta_ parameter contains a description of the request, including\nthe underlying details from Amazon. Take a look with:\n\n    console.log( JSON.stringify(meta) )\n\n\n## Conventions\n\nWhere possible, the SimpleDB naming style is preserved:\n`CamelCaseBaby`. Names of functions and their parameters also mostly match SimpleDB.\n\nThe _simpledb.SimpleDB_ wrapper options (_maxtry_, _secure_, etc) are\nnot directly related to Amazon, and so have their own names.\n\nIt is sometimes necessary to embed meta-directives into the Amazon\n_query_ or _result_ objects. These non-Amazon attributes always begin with\nthe _$_ character, but are in `CamelCase`. For example: `$AsArrays`.\n\nThis wrapper is based on the REST API. I looked at the SOAP API\nbut... yeah. No X.509 for you. Yet.\n\n\n## API\n\nFor the API examples, assume the following lines of code at the top of your source code file:\n\n    var simpledb = require('simpledb')\n\n    var sdb = new simpledb.SimpleDB(\n      {keyid:'YOUR_AWS_KEY_ID',secret:'YOUR_AWS_SECRET_KEY'},\n      simpledb.debuglogger\n    )\n\nThis gives you the standard wrapper, with a basic debugger that prints to STDOUT.\n\nYou should really also read the Amazon SimpleDB documentation so that you understand how SimpleDB works:\n[Amazon SimpleDB Developer Guide](http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/)\n\nAs a get-out-of-jail, you can provide request attribute overrides. You\nsupply these in an optional _override_ argument just before the callback\nargument. You can use an override on any of the SimpleDB action wrapper functions.\n\n    sdb.getItem('domain','itemname', {ConsistentRead:'false'} ,function(err,res,meta){ ... })\n\nIn the above code, `{ConsistentRead:\"false\"}` is the optional override argument.\n\n\n### simpledb.SimpleDB: `simpledb.SimpleDB( options, logger )`\n\n  * _options_: (required) set of options; _keyid_ and _secret_ are required\n  * _logger_: (optional) callback for log events\n\n    var sdb = new simpledb.SimpleDB( options, logger )\n\nCreate a new SimpleDB wrapper. The _options_ argument sets general\noptions for the requests. The _logger_ argument receives logging events\nso that you can debug and/or record SimpleDB interactions.\n\n_options_: required\n\n   * _keyid_: (required), your Amazon AWS Key ID\n   * _secret_: (required), your Amazon Secret Key\n\nFor further options, see the section on options below\n\n\n_logger_: optional\n\n  See the section on logging below\n\n\n### createDomain: `sdb.createDomain(domain,override,callback)`\n\n  * _domain_: (required) the name of the domain\n  * _override_: (optional) SimpleDB attributes to override function defaults\n  * _callback_: (required) callback function accepting parameters _callback(error, result, metadata)_\n\nCreate a domain. A domain is like a SQL table, sort of.\n\n    sdb.createDomain('<domain>',function(err,res,meta){\n      if( !err ) {\n        console.log('Mul-ti-pass!')\n      }\n    }\n\nWhere `<domain>` is the name of your domain.\n\n\n\n### domainMetadata: `sdb.domainMetadata(domain,override,callback)`\n\n  * _domain_: (required) the name of the domain\n  * _override_: (optional) SimpleDB attributes to override function defaults\n  * _callback_: (required) callback function accepting parameters _callback(error, result, metadata)_\n\nGet some statistics about your domain, such as a count of items and how much storage it is using (you pay Amazon for this!).\n\n    sdb.domainMetadata('<domain>',function(err,res,meta){\n       console.log('Mmm, floor pie! '+JSON.stringify(res) )\n    }\n\nWhere `<domain>` is the name of your domain.\n\n\n\n### listDomains: `sdb.listDomains(override,callback)`\n\n  * _override_: (optional) SimpleDB attributes to override function defaults\n  * _callback_: (required) callback function accepting parameters _callback(error, result, metadata)_\n\nReturns a list of your domain names as an array of strings. Restricted\nto the specified SimpleDB host (default=sdb.amazonaws.com). See the\n_simpledb.SimpleDB_ options to change this.\n\n    sdb.listDomains(function(err,res,meta){\n       console.log('You hear that? That's market bacon hitting the pan: '+JSON.stringify(res) )\n    }\n\n\n\n### deleteDomain: `sdb.deleteDomain(domain,override,callback)`\n\n  * _domain_: (required) the name of the domain\n  * _override_: (optional) SimpleDB attributes to override function defaults\n  * _callback_: (required) callback function accepting parameters _callback(error, result, metadata)_\n\nDelete a domain. Cannot be undone!\n\n    sdb.deleteDomain('<domain>',function(err,res,meta){\n      if( !err ) {\n        console.log('God made the world, but we made the field.')\n      }\n    }\n\nWhere `<domain>` is the name of your domain.\n\n\n### putItem: `sdb.putItem(domain,itemname,attrs,override,callback)`\n\n  * _domain_: (required) the name of the domain\n  * _itemname_: (required) the unique name of the item in the domain\n  * _attrs_: (required) the item attributes to store\n  * _override_: (optional) SimpleDB attributes to override function defaults\n  * _callback_: (required) callback function accepting parameters _callback(error, result, metadata)_\n\nStore an item in SimpleDB.\n\n    sdb.putItem('<domain>','<itemname>',\n      {\n        <attr>:'<value>',\n        ...\n      },\n      function(err,res,meta){\n        console.log(\"Memories, you're talking about memories: \"+JSON.stringify(res))\n      })\n\nWhere `<itemname>` is the unique name of your item, and\n`<attr>:\"<value>\"` are the attribute-value pairs for your item. The value\nmust be either a string or an array of strings.\n\nIf you want to use conditional puts, you'll need to add some override values:\n\n    sdb.putItem('<domain>','<itemname>',\n      {\n        <attr1>:'<value>',\n        <attr2>:['<value1>','<value2>',...]\n        ...\n      },\n      {\n        'Expected.1.Name':'VersionNumber',\n        'Expected.1.Value':'1'\n      },\n      function(err,res,meta){\n        console.log(\"Nobody expects the spanish inquistion! \"+JSON.stringify(res))\n      })\n\n\n### batchPutItem: `sdb.batchPutItem( domain, items, override, callback )`\n\n  * _domain_: (required) the name of the domain\n  * _items_: (required) the list of items to store\n  * _override_: (optional) SimpleDB attributes to override function defaults\n  * _callback_: (required) callback function accepting parameters _callback(error, result, metadata)_\n\nStore multiple items in the same request. This is more efficient. The _items_\nargument is an array of item objects. Each item object must have a\n_$ItemName_ meta-attribute that specifies the name of the item.\n\n    sdb.batchPutItem('<domain>',\n      [\n        { $ItemName:'<itemname1>', <attr>:'<value>', ...},\n        { $ItemName:'<itemname2>', <attr>:'<value>', ...}\n      ],function(err,res,meta){\n        console.log(\"And what was your ownership share diluted down to?\"+JSON.stringify(res))\n      })\n\n### batchDeleteItem: `sdb.batchDeleteItem( domain, items, override, callback )`\n\n  * _domain_: (required) the name of the domain\n  * _items_: (required) the list of items to delete\n  * _override_: (optional) SimpleDB attributes to override function defaults\n  * _callback_: (required) callback function accepting parameters _callback(error, result, metadata)_\n\nDelete multiple items in one request. This is more efficient. The _items_\nargument is an array of item objects. Each item object must have a\n_$ItemName_ meta-attribute that specifies the name of the item.\n\n    sdb.batchDeleteItem('<domain>',\n      [\n        { $ItemName:'<itemname1>', <attr>:'<value>', ...},\n        { $ItemName:'<itemname2>', <attr>:'<value>', ...}\n      ],function(err,res,meta){\n        console.log(\"Done\"+JSON.stringify(res))\n      })\n\n\n\n### getItem: `sdb.getItem( domain, itemname, override, callback )`\n\n  * _domain_: (required) the name of the domain\n  * _itemname_: (required) the unique name of the item in the domain\n  * _override_: (optional) SimpleDB attributes to override function defaults\n  * _callback_: (required) callback function accepting parameters _callback(error, result, metadata)_\n\nGet an item from SimpleDB using the item's unique name. The values of\nthe item's attributes are returned as strings.  You can provide an\n_$AsArrays_ meta-directive in the _override_ argument. When _true_, all\nattribute values are returned as arrays. As\nSimpleDb is schemaless, it is not possible to know in advance if an attribute\n is multi-valued. In the default case, `{$AsArrays:false}`,\nmultiple values are returned as string, with the value list\ncomma-separated. SimpleDB returns multiple values in alphabetical\norder.\n\n    sdb.getItem('<domain>','<itemname>',function( error , result, meta ){\n      console.log(\"Those are good burgers, Walter: \"+JSON.stringify(res))\n    })\n\n    sdb.getItem('<domain>','<itemname>',{$AsArrays:true},function( error, result, meta ){\n      console.log(\"I've been watching television so much the shows are starting to run together: \"+JSON.stringify(res))\n    })\n\nBy default, _simpledb_ uses consistent reads. For improved\nperformance, if this is suitable for your application, you can set the _consistent_ option to _false_ when creating\n_simpledb.SimpleDB_. Or you can set it on a case-by-case basis, using an override: `{ConsistentRead:\"false\"}`\n\n\n\n### deleteItem: `sdb.deleteItem( domain, itemname, attrs, override, callback )`\n\n  * _domain_: (required) the name of the domain\n  * _itemname_: (required) the unique name of the item in the domain\n  * _attrs_: (optional) the attributes to delete\n  * _override_: (optional) SimpleDB attributes to override function defaults\n  * _callback_: (required) callback function accepting parameters _callback(error, result, metadata)_\n\nDelete an item from SimpleDB. The _attrs_ argument is optional, and can be:\n  * an array of attribute names: all matching attributes will be deleted\n  * an object whose properties are attribute names:\nattributes of the item will be deleted if they have the same value as the object properties.\nValues can be either a single string, or an array of string values, in which case all matching attributes are deleted.\n\nIf no attributes are specified, the item is completely\nremoved. If present, only the specified attributes are removed. If all\nthe attributes of an item are removed, then it will also be completely\ndeleted.\n\n    sdb.deleteItem('<domain>','<itemname>',function( error, result, meta ){\n      console.log(\"Well, Ted, like I said the last time: it won't happen again: \"+JSON.stringify(res))\n    })\n\n    sdb.deleteItem('<domain>','<itemname>',[ '<attr>', ... ], function( error, result, meta ){\n      console.log(\"I felt like destroying something beautiful. \"+JSON.stringify(res))\n    })\n\n    sdb.deleteItem('<domain>','<itemname>',\n      { '<attr1>': '<value1>', 'attr2': ['<value2>, ... ], ... },\n      function( error, result, meta ){\n        console.log(\"I don't know what to write about. \"+JSON.stringify(res))\n      }\n    )\n\n\n### select: `sdb.select( query, override, callback )`\n\n  * _query_: (required) SimpleDB select expression\n  * _override_: (optional) SimpleDB attributes to override function defaults\n  * _callback_: (required) callback function accepting parameters _callback(error, result, metadata)_\n\nPerform a SELECT-style query on a SimpleDB domain. The syntax is\nalmost-but-not-quite SQL. You should read the Amazon documentation:\n[Using Select](http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/UsingSelect.html)\n\nThe results are returned as an array of items. Each item contains\nan _$ItemName_ meta-attribute providing you with the name of the item.\n\nIf you need to handle _NextToken_ you'll need to do this manually with\nthe override argument. You can get the _NextToken_ from the _meta_ parameter to your callback.\n\n    sdb.select(\"select * from <domain> where <attribute> = '<value>'\",function( error, result, meta ){\n      console.log(\"I'll get you, my pretty, and your little dog too! \"+JSON.stringify(result)+\" \"+JSON.stringify(meta))\n    })\n\n\n### request: `sdb.request( action, attrs, callback )`\n\n  * _action_: (required) SimpleDB action\n  * _attrs_: (required) SimpleDB request attributes\n  * _callback_: (required) callback function accepting parameters _callback(error, result, metadata)_\n\nMake a direct request to SimpleDB. You're on your own! Again, read\n[Amazon SimpleDB Developer Guide](http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/)\nUnlike the other functions above, the _request_ function is not a SimpleDB action wrapper. Use it when the wrapper functions have painted themselves into a corner.\n\n    sdb.request(\"<action>\",\n      {\n        <attribute>:\"<value>\",\n        ...\n      },\n      function( error, result, meta ){\n        console.log(\"Gotta keep 'em separated: \"+JSON.stringify(res))\n      })\n\nWhere `<action>` is the SimpleDB action, such as _GetItem_, and `<attribute>:\"<value>\"` are the SimpleDB REST request attribute pairs.\n\n\n### client: `sdb.client`\n\nThe `aws-lib` client object. Use this to send raw requests. Go hardcore.\n\n\n### handle: `sdb.handle( start, action, query, tryIndex, last, response, stop, callback, )`\n\n   * _start_: Date object, start time of request\n   * _action_: string, name of SimpleDB action\n   * _query_: full SimpleDB query\n   * _tryIndex_: number of tries attempted, up to maxtry\n   * _last_: true if this is the last request that will be made\n   * _response_: result from SimpleDB\n   * _stop_: stop(true|false), function to stop retries in case of errors\n   * _callback_: action-specific callback, as provided by functions like getItem, putItem, etc.\n\nReplace this with your own implementation to change the handling of\nSimpleDB responses. Most useful is to modify the response in some way\nand then call the original function. Also good for testing.\n\nThis example counts the number of requests made:\n\n    var resultcount = 0\n\n    var orighandle = sdb.handle\n    sdb.handle = function(start,action,query,tryIndex,last,response,stop,callback){\n      res.$ResultCount = resultcount++\n      orighandle(start,action,query,tryIndex,last,response,stop,callback)\n    }\n\n\n\n## Options\n\nThe additional options that can be given to _simpledb.SimpleDB_ are:\n\n   * _secure_: (optional, default=false), if true, use HTTPS\n   * _consistent_: (optional, default=true), if true, ask for consistent reads\n   * _test_: (optional, default=false), if true, don't actually send anything to SimpleDB\n   * _host_: (optional, default=sdb.amazon.com), SimpleDB host\n   * _path_: (optional, default=/), SimpleDB path\n   * _version_: optional), default=2009-04-15, SimpleDB API version\n   * _maxtry_: (optional, default=4), maximum number of retries when SimpleDB fails\n   * _delaymin_: (optional, default=0), minimum delay in milliseconds\n   * _delayscale_: (optional, default=100), delay multiplier, in milliseconds\n   * _randomdelay_: (optional, default=true), apply a random delay multiplier between 0 and 1\n   * _expbase_: (optional, default=4), exponent base, for the formula that calculates delay time when SimpleDB fails\n   * _nolimit_: (optional, default=false), if true, it will return results over the max limit of 2500 with subsequent api requests\n\n\n## Logging\n\nYou can provide a logger callback when you are creating the _simpledb.SimpleDB_\nobject to get notifications of request processing events. A simple logger that\nprints to STDOUT is provided by _simpledb.debuglogger_:\n\n    var sdb = new simpledb.SimpleDB( {...}, simpledb.debuglogger )\n\nThe logger callback accepts the following arguments:\n    logger( type, date, ... )\n\n   * _type_: string, one of _create_, _request_, _handle_, _error_, _status_\n   * _date_: a Date object\n   * ...: remaining arguments depend on type\n\nFor _type=create_, fired when the simpledb.SimpleDB object is created, the arguments are:\n\n   * _opts_: options object\n   * _awsopts_: aws-lib options\n\nFor _type=request_, fired just before a request is made to SimpleDB, the arguments are:\n\n   * _start_: Date object, start time of request\n   * _action_: string, name of SimpleDB action\n   * _query_: full SimpleDB query\n\nFor _type=handle_, fired after each response from SimpleDB, the arguments are:\n\n   * _start_: Date object, start time of request\n   * _action_: string, name of SimpleDB action\n   * _query_: full SimpleDB query\n   * _tryIndex_: number of tries attempted, up to maxtry\n   * _last_: true if this is the last request that will be made\n   * _response_: result from SimpleDB\n\nFor _type=error_, fired after any response with an error, the arguments are:\n\n   * _start_: Date object, start time of request\n   * _action_: string, name of SimpleDB action\n   * _query_: full SimpleDB query\n   * _tryIndex_: number of tries attempted, up to maxtry\n   * _last_: true if this is the last request that will be made\n   * _retry_: true if a retry will be attempted\n   * _err_: the error that occurred, an object like {Code:'...',Message:'...'}, where _Code_ is the Amazon error code\n   * _res_: the result\n   * _meta_: the request meta data\n\nFor _type=status_, fired after each retry, the arguments are:\n\n   * _done_: true if request has finally succeeded\n   * _tryIndex_: count of attempts\n   * _last_: true if this was the last attempt\n   * _delay_: delay in milliseconds until this attempt\n   * _err_: any error that occurred\n\n\n## Testing\n\nThe unit tests use [expresso](https://github.com/visionmedia/expresso)\n\n    npm install expresso\n    npm install eyes\n\nTo configure your keys, edit the test/keys.js file.\nThe tests are in test/simpledb.test.js\n\n\n## Amazon AWS SimpleDB\n\nHere's some more information on SimpleDB:\n\n[Amazon AWS SimpleDB Developer Guide](http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/)\n\n\n","homepage":"https://github.com/rjrodger/simpledb","keywords":["amazon","aws","simpledb","database","wrapper","api"],"contributors":[{"name":"Richard Rodger","email":"richard@ricebridge.com","url":"http://richardrodger.com/"},{"name":"John Roberts","email":"jroberts@logitech.com"},{"name":"Makis Tracend","email":"makis@makesit.es","url":"http://makesites.org/"}],"bugs":{"url":"https://github.com/rjrodger/simpledb/issues"},"readmeFilename":"README.md"}