Class: ROM::Memory::Commands::Create
- Inherits:
-
Commands::Create
- Object
- Command
- Commands::Create
- ROM::Memory::Commands::Create
- Defined in:
- core/lib/rom/memory/commands.rb
Overview
In-memory create command
Instance Method Summary collapse
Instance Method Details
#execute(tuples) ⇒ Object
19 20 21 22 23 24 25 |
# File 'core/lib/rom/memory/commands.rb', line 19 def execute(tuples) Array([tuples]).flatten.map { |tuple| attributes = input[tuple] relation.insert(attributes.to_h) attributes }.to_a end |