Class: Rom::Dynamo::Commands::Create
- Inherits:
-
ROM::Commands::Create
- Object
- ROM::Commands::Create
- Rom::Dynamo::Commands::Create
- Defined in:
- lib/rom/dynamo/commands.rb
Overview
DynamoDB create command
Instance Method Summary collapse
Instance Method Details
#dataset ⇒ Object
15 16 17 |
# File 'lib/rom/dynamo/commands.rb', line 15 def dataset relation.dataset end |
#execute(tuples) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/rom/dynamo/commands.rb', line 8 def execute(tuples) Array([tuples]).flatten.map do |tuple| attributes = input[tuple] dataset.insert(attributes.to_h) end end |