You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// EnableInterpolation = true
data := []interface{}{1,"hello", true} // some data
db.Exec("INSERT INTO table (a, b, c) VALUES ($1, $2, $3)", data)
=> err: sql: converting Exec argument #0's type: unsupported type []interface {}, a slice
using driver github.com/jackc/pgx/stdlib, package gopkg.in/mgutz/dat.v2/dat
maybe someone was had this error, so can help me. Also it will be cool func .Values() to can handle slice
The text was updated successfully, but these errors were encountered:
First, I can't guarantee anything works with pgx/stdlib. I made a separate runner for it and found it to actually be slower with my test cases and discontinued supporting it.
Need to use spread operator, otherwise dat treats that as a single value
res, err:=DB.SQL("INSERT INTO table (a, b, c) VALUES ($1, $2, $3)", data...).Exec()
Hi, I have issue with
using driver
github.com/jackc/pgx/stdlib
, packagegopkg.in/mgutz/dat.v2/dat
maybe someone was had this error, so can help me. Also it will be cool func
.Values()
to can handle sliceThe text was updated successfully, but these errors were encountered: