delete.js
delete_sql.js
// delete an item from a HASH-RANGE table
DynamoDB
.table('messages')
.where('to').eq( 'user1@test.com' )
.where('date').eq( 1375538399 )
.return(DynamoDB.ALL_OLD)
.delete(function( err, data ) {
console.log( err, data )
});
// as of 1.2.9 , "to" and "date" attributes no longer need to be
// wrapped as `keyword` even though they are keywords
DynamoDB.query(`
DELETE FROM
messages
WHERE
to = 'user' + '@' + 'domain.com' AND
date = new Date("2018-08-01T13:49:58.043Z").getTime()
`, function( err, data ) {
console.log( err, data )
});