Skip to content

Commit

Permalink
fix: README Isolation Levels section import example
Browse files Browse the repository at this point in the history
  • Loading branch information
vkondratiuk482 committed Nov 6, 2023
1 parent 340dbc4 commit 3270fa4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ Package gives you an ability to work with essential isolation levels:
* `REPEATABLE READ`
* `SERIALIZABLE`

Just import `IsolationLevels` and pass the desired level as a second argument of `PropagatedTransaction.run()` method

By default we use `READ COMMITTED` isolations level

```js
Expand All @@ -238,6 +240,10 @@ const KnexTransactionRunner = {
```

```js
const { IsolationLevels } = require('@mokuteki/propagated-transactions')

// some code

async create(payload1, payload2) {
const callback = async () => {
const user = await userService.create(payload1);
Expand Down

0 comments on commit 3270fa4

Please sign in to comment.