extension-read-replicas
extension-read-replicas copied to clipboard
Prisma Client Extension to add read replica support to your Prisma Client
By default, we select replicas randomly. Users might want to use different selection criterea: for example, round robin or weighted random selection. We should have an option to provide custom...
PlanetScale does read replicas a bit differently. They have two separate concepts: 1. Database replicas: https://planetscale.com/docs/concepts/replicas The number of replicas depends on your account plan. 2. Read-only replicas: https://planetscale.com/docs/concepts/read-only-regions You...
When using Prisma's Fluent API with a read replica, the returned object does not adhere to the expected structure. Repro: [read-replicas-demo](https://github.com/snake575/read-replicas-demo) Current Behavior: Using the primary database, the following code:...
Prisma extensions are fairly new and there are not many examples of how to use them with the NestJS framework. I think this official extension would be a great place...
Currently, the default behavior of this extension is sending every read query to the replica(s) and every write to the primary. While you can opt-in to using the primary with...
I want to do the same thing as the code below. What I want to do is log the query to be executed. Is it possible to log the query...
This PR resolves #20 . Changes: - Updated ReplicaManager.ts to accept replicaClientOptions. - Fix instantiation of Prisma Clients to include replicaClientOptions. - Updated PrismaClientConstructor type. - readReplicas in extension.ts now...
I think a minor change is required on the readOperations list. If you run a $queryRaw it will not match, as inserting a log statement yields the operation to contain...
Hello, I'm using this package with a [Aurora Serverless v2](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html) MySQL database. I have a single writer and readers that scale. I've noticed that when new readers scale up they...