Documentation ¶
Overview ¶
Package dbx provides helpers for the database/sql package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLocalLockTimeout ¶
SetLocalLockTimeout returns a transaction option which will set the lock timeout for the transaction.
func Transact ¶
func Transact(ctx context.Context, db *sql.DB, fns ...func(context.Context, *sql.Tx) error) (retErr error)
Transact begins a transaction, executes a sequence of functions on that transaction, and commits. If any of the functions returns a non-nil error or panics, execution is halted and the transaction will be rolled back.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.