Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteInTransaction ¶
func ExecuteInTransaction[T any](ctx context.Context, log logger.Logger, db *sql.DB, fn func(ctx context.Context, tx *sql.Tx) (T, error)) (res T, err error)
ExecuteInTransaction executes a function in a transaction. If the handler returns an error, the transaction is rolled back automatically.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.