Method: AWS::DynamoDB::BatchWrite#delete
- Defined in:
- lib/aws/dynamo_db/batch_write.rb
#delete(table, items) ⇒ nil
Adds one or more items to the batch to delete.
# for a table w/out a range key
batch = AWS::DynamoDB::BatchWrite.new
batch.delete('table-name', %w(hk1 hk2))
batch.process!
# for a table with a range key
batch = AWS::DynamoDB::BatchWrite.new
batch.delete('table-name', [['hk1', 'rk2'], ['hk1', 'rk2']]])
batch.process!
83 84 85 86 |
# File 'lib/aws/dynamo_db/batch_write.rb', line 83 def delete table, items write(table, :delete => items) nil end |