Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTransaction ¶
CreateTransaction creates a transaction for the database with context
Parameters:
- ctx: The context for the transaction
- pool: The pgxpool.Pool instance
- fn: The function to execute within the transaction
Returns:
- error: An error if the transaction fails, otherwise nil
Types ¶
type TransactionFn ¶ added in v0.7.5
TransactionFn is the function type for transactions with context
Click to show internal directories.
Click to hide internal directories.