2
0

Resplit Begin and BeginEx

This is in preparation for a Begin / Tx interface that will similate
nested transactions with savepoints.

In addition, this passes the TxOptions struct by value and thereby
removes an allocation.
This commit is contained in:
Jack Christensen
2019-08-17 15:53:55 -05:00
parent f3c703a102
commit c3e41872a8
9 changed files with 44 additions and 35 deletions
+2 -2
View File
@@ -413,7 +413,7 @@ func benchmarkWriteNRowsViaInsert(b *testing.B, n int) {
for i := 0; i < b.N; i++ {
src := newBenchmarkWriteTableCopyFromSrc(n)
tx, err := conn.Begin(context.Background(), nil)
tx, err := conn.Begin(context.Background())
if err != nil {
b.Fatal(err)
}
@@ -452,7 +452,7 @@ func multiInsert(conn *pgx.Conn, tableName string, columnNames []string, rowSrc
}
resetQuery()
tx, err := conn.Begin(context.Background(), nil)
tx, err := conn.Begin(context.Background())
if err != nil {
return 0, err
}