Promisifies Dynogels' (DynamoDB mapper) methods using Bluebird
npm install dynogels-promisifiedThis package promisifies the functions in Dynogels using Bluebird using the default 'Async' suffix. i.e. all methods in
Dynogels are modified with an 'Async' suffix.
``javascript`
var dynogels = require("dynogels-promisified");
`javascript
var User = module.exports = dynogels.define("User", {
hashKey : "userId",
timestamps : false,
schema : {
userId: dynogels.types.uuid(),
name: Joi.string(),
},
});
User
.getAsync(userId)
.then(function(user){
// ...
})
.catch(function(err){
// ...
});
User
.scan()
.where("userId").equals(userId)
.execAsync()
.then(function(user){
// ...
})
.catch(function(err){
// ...
});
``