Hi!

I expected Sequel to accept and process this with no issues:

DB[:table].insert(
  [ :a, :b],
  [
    [1, 2],
    [2, 3],
    [3, 4]])

(these are really constant values, in my test suite)

This was rejected because the number of columns wasn't the same (a, b) vs 3 
entries in the 2nd parameter.

Jeremy, would you accept a patch that accepted such values?

Of course, I can just do

  [
    [1, 2],
    [2, 3],
    [3, 4]].each do |row|
  DB[:table].insert([ :a, :b], row)
end

but now the column declarations are divorced from the values. With the code at 
the top, I can format it so the columns line up, and it almost looks like I'm 
importing CSV.

Thanks!
François

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to