docs: add v5 migration guide

This commit is contained in:
2026-07-11 15:09:41 +02:00
committed by d3vyce
parent 51acf61d0f
commit 7da08ffd9a
4 changed files with 166 additions and 6 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ The function creates and manages its own **dedicated session** internally, yield
user.balance += 100
# With a custom lock mode
async with lock_tables(session, [Order], mode=LockMode.EXCLUSIVE):
async with lock_tables(session=session, tables=[Order], mode=LockMode.EXCLUSIVE):
await process_order(session, order_id)
```
@@ -35,6 +35,6 @@ The function creates and manages its own **dedicated session** internally, yield
user.balance += 100
# With a custom lock mode
async with lock_tables(session_maker, [Order], mode=LockMode.EXCLUSIVE) as session:
async with lock_tables(session_maker=session_maker, tables=[Order], mode=LockMode.EXCLUSIVE) as session:
await process_order(session, order_id)
```