Skip to content

Commit

Permalink
fix(client): fixed prisma transaction type
Browse files Browse the repository at this point in the history
  • Loading branch information
medz committed Mar 5, 2023
1 parent 887eb33 commit 2cf52ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/client/prisma_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ abstract class BasePrismaClient<Client extends BasePrismaClient<Client>> {
/// });
/// ```
Future<T> $transaction<T>(
PrismaTransactionCallback<T, BasePrismaClient<Client>> callback, {
PrismaTransactionCallback<T, Client> callback, {
TransactionHeaders? headers,
Duration timeout = const Duration(seconds: 5),
Duration maxWait = const Duration(seconds: 2),
TransactionIsolationLevel? isolationLevel,
}) async {
// If the client is a transaction, use it.
if (_headers?.transactionId != null || _transaction != null) {
return callback(this);
return callback(this as Client);
}

// Request a new transaction.
Expand Down

1 comment on commit 2cf52ad

@vercel
Copy link

@vercel vercel bot commented on 2cf52ad Mar 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.