From 4991b5a71a269021b5688c0a11577da3d75ba7a8 Mon Sep 17 00:00:00 2001 From: Semen Syrovatskiy Date: Wed, 31 Jan 2024 14:24:15 +0300 Subject: [PATCH] docs: add transaction isolation levels --- docs/reference/transactions.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/reference/transactions.md b/docs/reference/transactions.md index 14751a55e..36d2fa412 100644 --- a/docs/reference/transactions.md +++ b/docs/reference/transactions.md @@ -114,6 +114,17 @@ In the case that this example runs successfully, then both database writes are c ) ``` +## Isolation levels + +By default, Prisma sets the isolation level to the value currently configured in the database. You can modify this +default with the `isolation_level` argument (see [supported isolation levels](https://www.prisma.io/docs/orm/prisma-client/queries/transactions#supported-isolation-levels)). + +```py +prisma.tx( + isolation_level=prisma.TransactionIsolationLevel.READ_UNCOMMITTED, +) +``` + ## Timeouts You can pass the following options to configure how timeouts are applied to your transaction: