Well, I would think it would make things much easier if the first query argument was set to arr[0], the second to arr[1], etc... A mismatch in type of number would error out, I would think...
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
What is preventing you from calling db.Query with a slice?
On Thu, Mar 26, 2015 at 7:38 AM Frank Davidson <ffdav...@gmail.com> wrote:
Well, I would think it would make things much easier if the first query argument was set to arr[0], the second to arr[1], etc... A mismatch in type of number would error out, I would think...
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
It can only be a slice of interface{}, correct? Why can't it just be any slice? I understand that I can convert to []interface{} by why not just let us use []string or similar and let the database decide if it's the right type?
t := []int{1, 2, 3, 4}
s := make([]interface{}, len(t))
for i, v := range t {
s[i] = v
}