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

Method Commit

tx.go:130–130  ·  view source on GitHub ↗

Commit commits the transaction if this is a real transaction or releases the savepoint if this is a pseudo nested transaction. Commit will return an error where errors.Is(ErrTxClosed) is true if the Tx is already closed, but is otherwise safe to call multiple times. If the commit fails with a rollba

(ctx context.Context)

Source from the content-addressed store, hash-verified

128 // otherwise safe to call multiple times. If the commit fails with a rollback status (e.g. the transaction was already
129 // in a broken state) then an error where errors.Is(ErrTxCommitRollback) is true will be returned.
130 Commit(ctx context.Context) error
131
132 // Rollback rolls back the transaction if this is a real transaction or rolls back to the savepoint if this is a
133 // pseudo nested transaction. Rollback will return an error where errors.Is(ErrTxClosed) is true if the Tx is already

Implementers 3

dbTxtx.go
Txpgxpool/tx.go

Calls

no outgoing calls