extension-read-replicas icon indicating copy to clipboard operation
extension-read-replicas copied to clipboard

Add options for replica clients

Open yicrotkd opened this issue 2 years ago • 0 comments

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

yicrotkd avatar Nov 14 '23 12:11 yicrotkd