Skip to content

Commit

Permalink
Merge pull request #7 from prisma/janpio-patch-2
Browse files Browse the repository at this point in the history
docs(README): Make limitations a list + fix code example
  • Loading branch information
SevInf authored Sep 5, 2023
2 parents b413d07 + 2174a51 commit ca7440e
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,15 @@ prisma.$primary().user.findMany({ where: { ... }})

### Caveats and limitations

At the moment, if you are using this read replicas extension alongside other extensions, this extension should be applied last:

```ts
const prisma = new PrismaClient()
.$extends(withAccelerate())
.$extends(rlsExtension())
.$extends(
readReplicas({
db: 'postgresql://replica.example.com:5432/db',
}),
)
```

If you are using the read replicas extension with Prisma version below 5.1, any result extensions will not work.
- At the moment, if you are using this read replicas extension alongside other extensions, this extension should be applied last:
```ts
const prisma = new PrismaClient()
.$extends(withAccelerate())
.$extends(rlsExtension())
.$extends(
readReplicas({
url: 'postgresql://replica.example.com:5432/db',
}),
)
```
- If you use the read replicas extension with Prisma version below 5.1, any result extensions will not work.

0 comments on commit ca7440e

Please sign in to comment.