extension-read-replicas
extension-read-replicas copied to clipboard
Add options for replica clients
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 supports replicaClientOptions.
- Added a test for replica client options.
Inheriting the configuration from the primary, as discussed here, seems challenging because the constructor arguments are unavailable from the instance.
If implementing for this inheritance, it seems to make modifications to the Prisma Client core, allowing for the retrieval of constructor arguments from the instance.
Close #20