Class: Rom::Dynamo::Commands::Update
- Inherits:
-
ROM::Commands::Update
- Object
- ROM::Commands::Update
- Rom::Dynamo::Commands::Update
- Defined in:
- lib/rom/dynamo/commands.rb
Overview
DynamoDB update command
Instance Method Summary collapse
Instance Method Details
#dataset ⇒ Object
29 30 31 |
# File 'lib/rom/dynamo/commands.rb', line 29 def dataset relation.dataset end |
#execute(params) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/rom/dynamo/commands.rb', line 22 def execute(params) attributes = input[params] relation.map do |tuple| dataset.update(tuple, attributes.to_h) end end |