Hi,

I am using Sequel mostly for the convenience of bind variables (with
MSSQL/tiny_tds).

I see positional binds are possible with a straight SQL call, as in:

arr = [33, 26, 33]
sth = dbh['insert into mytab(a, b, c) values (?, ?, ?)', *arr]
sth.call(:insert)

Is there any way to set the binds from an array when *calling* the prepared
statement?

Something like this??:

sth = dbh['insert into mytab(a, b, c) values (?, ?, ?)']
records.each |row|
  # I do not believe this is possible
  sth.call(:insert, *row)
end

I have some data loads that would be a lot simpler if I could just use an
array that provided binds in the same order as the statement rather than
going through symbols and a a hash.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sequel-talk+unsubscr...@googlegroups.com.
To post to this group, send email to sequel-talk@googlegroups.com.
Visit this group at https://groups.google.com/group/sequel-talk.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/CAEPoj6x0c-Ez_%3D9bnEYhQd3nnCfoi%3DPX0DjCccY_0ecNXqqxog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to