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 [email protected].
To post to this group, send email to [email protected].
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/50dbd219-6834-4729-892b-5c04badd9988%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to