MCPcopy
hub / github.com/jackc/pgx / TestTxQueryRow

Function TestTxQueryRow

pgxpool/tx_test.go:47–62  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

45}
46
47func TestTxQueryRow(t *testing.T) {
48 t.Parallel()
49
50 ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
51 defer cancel()
52
53 pool, err := pgxpool.New(ctx, os.Getenv("PGX_TEST_DATABASE"))
54 require.NoError(t, err)
55 defer pool.Close()
56
57 tx, err := pool.Begin(ctx)
58 require.NoError(t, err)
59 defer tx.Rollback(ctx)
60
61 testQueryRow(t, ctx, tx)
62}
63
64func TestTxSendBatch(t *testing.T) {
65 t.Parallel()

Callers

nothing calls this directly

Calls 5

NewFunction · 0.92
testQueryRowFunction · 0.85
CloseMethod · 0.65
BeginMethod · 0.65
RollbackMethod · 0.65

Tested by

no test coverage detected