@anabode/dynamodb_service
Advanced tools
Comparing version
{ | ||
"name": "@anabode/dynamodb_service", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "dynamodb abstraction", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -20,3 +20,4 @@ var AWS = require('aws-sdk'); | ||
service.prototype.putItem = function (putStuff, callback) { | ||
this.dynamo.put(putStuff, (err, data) => { | ||
this._putStuff = putStuff; | ||
this.dynamo.put(this._putStuff, (err, data) => { | ||
if (err) { | ||
@@ -37,3 +38,4 @@ if (err.code == "ConditionalCheckFailedException") { | ||
service.prototype.updateItemInPlace = function (putStuff, callback) { | ||
this.dynamo.put(putStuff, (err, data) => { | ||
this.__putStuff = putStuff; | ||
this.dynamo.put(this.__putStuff, (err, data) => { | ||
if (err) { | ||
@@ -54,3 +56,4 @@ if (err.code == "ConditionalCheckFailedException") { | ||
service.prototype.updateItem = function (updatedStuff, callback) { | ||
this.dynamo.update(updatedStuff, (err, data) => { | ||
this._updateStuff = updatedStuff; | ||
this.dynamo.update(this._updatedStuff, (err, data) => { | ||
if (err) { | ||
@@ -71,3 +74,4 @@ if (err.code == "ConditionalCheckFailedException") { | ||
service.prototype.getItem = function (getStuff, callback) { | ||
this.dynamo.get(getStuff, (err, data) => { | ||
this._getStuff = getStuff; | ||
this.dynamo.get(this._getStuff, (err, data) => { | ||
return callback(err, data) | ||
@@ -78,3 +82,4 @@ }); | ||
service.prototype.deleteItem = function (deleteStuff, callback) { | ||
this.dynamo.delete(deleteStuff, (err, data) => { | ||
this._deleteStuff = deleteStuff; | ||
this.dynamo.delete(this._deleteStuff, (err, data) => { | ||
return callback(err, data); | ||
@@ -85,3 +90,4 @@ }); | ||
service.prototype.queryItem = function (queryStuff, callback) { | ||
this.dynamo.query(queryStuff, (err, data) => { | ||
this._queryStuff = queryStuff; | ||
this.dynamo.query(this._queryStuff, (err, data) => { | ||
return callback(err, data) | ||
@@ -91,2 +97,2 @@ }); | ||
module.exports = service; | ||
module.exports = exports = service; |
4508
6.05%82
7.89%