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:
+2
-2
@@ -463,7 +463,7 @@ func TestTxSendBatch(t *testing.T) {
|
||||
);`
|
||||
mustExec(t, conn, sql)
|
||||
|
||||
tx, _ := conn.Begin(context.Background(), nil)
|
||||
tx, _ := conn.Begin(context.Background())
|
||||
batch := &pgx.Batch{}
|
||||
batch.Queue("insert into ledger1(description) values($1) returning id",
|
||||
[]interface{}{"q1"},
|
||||
@@ -538,7 +538,7 @@ func TestTxSendBatchRollback(t *testing.T) {
|
||||
);`
|
||||
mustExec(t, conn, sql)
|
||||
|
||||
tx, _ := conn.Begin(context.Background(), nil)
|
||||
tx, _ := conn.Begin(context.Background())
|
||||
batch := &pgx.Batch{}
|
||||
batch.Queue("insert into ledger1(description) values($1) returning id",
|
||||
[]interface{}{"q1"},
|
||||
|
||||
Reference in New Issue
Block a user