Function transaction_with_isolation
Source pub async fn transaction_with_isolation<'a, T, F, Fut>(
pool: &PgPool,
isolation_level: IsolationLevel,
f: F,
) -> TransactionResult<T>
Expand description
Execute a function within a transaction with a specific isolation level
§Arguments
pool - The database connection pool
isolation_level - The isolation level for the transaction
f - The async function to execute within the transaction
§Returns
The result of the function, or a transaction error