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 pginterfaces.PGXPoolConn, timeout time.Duration, fn func(ctx context.Context, tx pgx.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.