package crdbgorm

import "github.com/cockroachdb/cockroach-go/crdb/crdbgorm"

Index

Functions

func ExecuteTx

func ExecuteTx(
	ctx context.Context, db *gorm.DB, opts *sql.TxOptions, fn func(tx *gorm.DB) 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

gorm.go

Version
v2.0.1+incompatible (latest)
Published
Jun 23, 2020
Platform
js/wasm
Imports
4 packages
Last checked
1 hour ago

Tools for package owners.