package crdbsqlx
import "github.com/cockroachdb/cockroach-go/v2/crdb/crdbsqlx"
Index ¶
Functions ¶
func ExecuteTx ¶
func ExecuteTx( ctx context.Context, db *sqlx.DB, opts *sql.TxOptions, fn func(*sqlx.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.
Source Files ¶
- Version
- v2.4.0 (latest)
- Published
- Feb 5, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 3 weeks ago –
Tools for package owners.