Rename BeginEx to BeginTx and update docs
This commit is contained in:
+4
-4
@@ -113,13 +113,13 @@ func TestTxCommitSerializationFailure(t *testing.T) {
|
||||
}
|
||||
defer c1.Exec(context.Background(), `drop table tx_serializable_sums`)
|
||||
|
||||
tx1, err := c1.BeginEx(context.Background(), pgx.TxOptions{IsoLevel: pgx.Serializable})
|
||||
tx1, err := c1.BeginTx(context.Background(), pgx.TxOptions{IsoLevel: pgx.Serializable})
|
||||
if err != nil {
|
||||
t.Fatalf("Begin failed: %v", err)
|
||||
}
|
||||
defer tx1.Rollback(context.Background())
|
||||
|
||||
tx2, err := c2.BeginEx(context.Background(), pgx.TxOptions{IsoLevel: pgx.Serializable})
|
||||
tx2, err := c2.BeginTx(context.Background(), pgx.TxOptions{IsoLevel: pgx.Serializable})
|
||||
if err != nil {
|
||||
t.Fatalf("Begin failed: %v", err)
|
||||
}
|
||||
@@ -196,7 +196,7 @@ func TestBeginIsoLevels(t *testing.T) {
|
||||
|
||||
isoLevels := []pgx.TxIsoLevel{pgx.Serializable, pgx.RepeatableRead, pgx.ReadCommitted, pgx.ReadUncommitted}
|
||||
for _, iso := range isoLevels {
|
||||
tx, err := conn.BeginEx(context.Background(), pgx.TxOptions{IsoLevel: iso})
|
||||
tx, err := conn.BeginTx(context.Background(), pgx.TxOptions{IsoLevel: iso})
|
||||
if err != nil {
|
||||
t.Fatalf("conn.Begin failed: %v", err)
|
||||
}
|
||||
@@ -220,7 +220,7 @@ func TestBeginReadOnly(t *testing.T) {
|
||||
conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
|
||||
defer closeConn(t, conn)
|
||||
|
||||
tx, err := conn.BeginEx(context.Background(), pgx.TxOptions{AccessMode: pgx.ReadOnly})
|
||||
tx, err := conn.BeginTx(context.Background(), pgx.TxOptions{AccessMode: pgx.ReadOnly})
|
||||
if err != nil {
|
||||
t.Fatalf("conn.Begin failed: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user