vogels-promisified
v2.2.4
Published
DynamoDB library Vogels promisified
Downloads
600
Maintainers
Readme
vogels-promisified
DynamoDB library Vogels promisified for use with Bluebird
A drop-in replacement that extends Vogels with Async
methods.
Usage
const vogels = require("vogels-promisified");
Example
var User = module.exports = vogels.define("User", {
hashKey : "email",
timestamps : true,
schema : {
_id : vogels.types.uuid(),
email : Joi.string().email(),
},
});
User
.getAsync(email)
.then(function(user){
// ...
})
.catch(function(err){
// ...
});
User
.scan()
.where("_id").equals(userId)
.execAsync()
.then(function(user){
// ...
})
.catch(function(err){
// ...
});