We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 586d6b8 commit d9a4e78Copy full SHA for d9a4e78
src/index.ts
@@ -120,7 +120,7 @@ class PlanetScaleConnection implements DatabaseConnection {
120
constructor(client: Client, useSharedConnection = false, isForTransaction = false) {
121
this.#client = client
122
this.#useSharedConnection = useSharedConnection && !isForTransaction
123
- if (this.#useSharedConnection) sharedConnections.set(this.#config, this.#client.connection())
+ if (this.#useSharedConnection) sharedConnections.set(this.#config, sharedConnections.get(this.#config) ?? this.#client.connection())
124
}
125
126
async executeQuery<O>(compiledQuery: CompiledQuery): Promise<QueryResult<O>> {
0 commit comments