Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoTransaction ¶
func DoTransaction[T any](ctx context.Context, opts *sql.TxOptions, conn *sql.DB, fn func(context.Context, *sql.Tx) resultext.Result[T, error]) resultext.Result[T, error]
DoTransaction is a helper function that abstracts some complexities of dealing with a transaction and rolling it back.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.