2
0

Remove ExecEx

This commit is contained in:
Jack Christensen
2019-01-02 12:52:37 -06:00
parent 12857ad05b
commit 89c3d8af5d
8 changed files with 84 additions and 306 deletions
+3 -3
View File
@@ -395,7 +395,7 @@ func benchmarkWriteNRowsViaInsert(b *testing.B, n int) {
for src.Next() {
values, _ := src.Values()
if _, err = tx.Exec("insert_t", values...); err != nil {
if _, err = tx.Exec(context.Background(), "insert_t", values...); err != nil {
b.Fatalf("Exec unexpectedly failed with: %v", err)
}
}
@@ -457,7 +457,7 @@ func multiInsert(conn *pgx.Conn, tableName string, columnNames []string, rowSrc
rowsThisInsert++
if rowsThisInsert == maxRowsPerInsert {
_, err := tx.Exec(sqlBuf.String(), args...)
_, err := tx.Exec(context.Background(), sqlBuf.String(), args...)
if err != nil {
return 0, err
}
@@ -468,7 +468,7 @@ func multiInsert(conn *pgx.Conn, tableName string, columnNames []string, rowSrc
}
if rowsThisInsert > 0 {
_, err := tx.Exec(sqlBuf.String(), args...)
_, err := tx.Exec(context.Background(), sqlBuf.String(), args...)
if err != nil {
return 0, err
}