This repository was archived by the owner on Jun 19, 2023. It is now read-only.
Can I ask for a better example in the expressions package? #90
Open
Description
I really have been strugly to undestand how to use it. For example, I need to make my dynamodb just make a update(acting as a create) if there is no username
. I know that to doing that I have to do this:
dynamodb.putItem({
TableName: config.DDB_TABLE,
Item: {
email: {
S: email
},
passwordHash: {
S: password
},
passwordSalt: {
S: salt
},
verified: {
BOOL: false
},
verifyToken: {
S: token
}
},
ConditionExpression: 'attribute_not_exists (email)'
}, function(err, data) {
if (err) return fn(err);
else fn(null, token);
});
How I make this a operation with the mapper
and expressions
lib?