I'd really love to have sqlc generate type-safe CopyFrom methods, as CopyFrom is orders of magnitude faster than sequential inserts. I'm imagining sqlc could detect simple insert statements like `INSERT INTO table (a, b, c) VALUES ($1, $2, $3)` and it could generate something like: `func (q *Queries) BulkQueryName(ctx context.Context, rows []QueryNameParams) error` in addition to the usual `func (q *Queries) QueryName(ctx context.Context, arg QueryNameParams) error` CopyFrom is only supported by pgx, so it might be a mostly backwards compatible change to add CopyFrom() to the DBTX interface.
Activity