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

Method Begin

tx.go:94–96  ·  view source on GitHub ↗

Begin starts a transaction. Unlike [database/sql], the context only affects the begin command. i.e. there is no auto-rollback on context cancellation.

(ctx context.Context)

Source from the content-addressed store, hash-verified

92// Begin starts a transaction. Unlike [database/sql], the context only affects the begin command. i.e. there is no
93// auto-rollback on context cancellation.
94func (c *Conn) Begin(ctx context.Context) (Tx, error) {
95 return c.BeginTx(ctx, TxOptions{})
96}
97
98// BeginTx starts a transaction with txOptions determining the transaction mode. Unlike [database/sql], the context only
99// affects the begin command. i.e. there is no auto-rollback on context cancellation.

Callers

nothing calls this directly

Calls 1

BeginTxMethod · 0.95

Tested by

no test coverage detected