Exec() is variadic and takes `interface{}`s , so it can take more as
you add more. So, `db.Exec("insert into faketable (name, created_at)
VALUES (($1), (2));", "myname", time.Now())` would work.
Yeah, there is a dearth of documentation in pq and the database/sql
package docs seem to leave the task of documentation up the
implementing packages. Which is maybe not great but there's decent
reasoning for that. Each database has its own escaping style, so
people might use the wrong one if there's some "canonical" form
documented in database/sql.
This could probably be solved by some nice examples in a doc.go file in pq.
On Wed, Aug 15, 2012 at 1:36 PM, Christopher Hobbs <
ch...@altbit.org> wrote:
> How can this be extended for multiple attributes? Can you mix attribute
> types (string, timestamp, etc)?