Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteTx ¶
func ExecuteTx( ctx context.Context, conn Conn, txOptions pgx.TxOptions, fn func(pgx.Tx) error, ) error
ExecuteTx runs fn inside a transaction and retries it as needed. On non-retryable failures, the transaction is aborted and rolled back; on success, the transaction is committed.
See crdb.ExecuteTx() for more information.
conn can be a pgx.Conn or a pgxpool.Pool.
Types ¶
Click to show internal directories.
Click to hide internal directories.