Module: ROM::SQL::Commands::Postgres::Create

Defined in:
lib/rom/sql/commands_ext/postgres.rb

Instance Method Summary collapse

Instance Method Details

#insert(tuples) ⇒ Object



9
10
11
12
13
# File 'lib/rom/sql/commands_ext/postgres.rb', line 9

def insert(tuples)
  tuples.map do |tuple|
    relation.dataset.returning(*relation.columns).insert(tuple)
  end.flatten
end