@prisma/adapter-planetscale 6.13.0-dev.1 → 6.13.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -3
- package/dist/index.mjs +2 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -338,7 +338,6 @@ function parseErrorMessage(error) {
|
|
|
338
338
|
return void 0;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
var LOCK_TAG = Symbol();
|
|
342
341
|
var PlanetScaleTransaction = class extends PlanetScaleQueryable {
|
|
343
342
|
constructor(tx, options, txDeferred, txResultPromise) {
|
|
344
343
|
super(tx);
|
|
@@ -349,9 +348,9 @@ var PlanetScaleTransaction = class extends PlanetScaleQueryable {
|
|
|
349
348
|
// The PlanetScale connection objects are not meant to be used concurrently,
|
|
350
349
|
// so we override the `performIO` method to synchronize access to it with a mutex.
|
|
351
350
|
// See: https://github.com/mattrobenolt/ps-http-sim/issues/7
|
|
352
|
-
|
|
351
|
+
#mutex = new import_async_mutex.Mutex();
|
|
353
352
|
async performIO(query) {
|
|
354
|
-
const release = await this
|
|
353
|
+
const release = await this.#mutex.acquire();
|
|
355
354
|
try {
|
|
356
355
|
return await super.performIO(query);
|
|
357
356
|
} catch (e) {
|
package/dist/index.mjs
CHANGED
|
@@ -302,7 +302,6 @@ function parseErrorMessage(error) {
|
|
|
302
302
|
return void 0;
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
var LOCK_TAG = Symbol();
|
|
306
305
|
var PlanetScaleTransaction = class extends PlanetScaleQueryable {
|
|
307
306
|
constructor(tx, options, txDeferred, txResultPromise) {
|
|
308
307
|
super(tx);
|
|
@@ -313,9 +312,9 @@ var PlanetScaleTransaction = class extends PlanetScaleQueryable {
|
|
|
313
312
|
// The PlanetScale connection objects are not meant to be used concurrently,
|
|
314
313
|
// so we override the `performIO` method to synchronize access to it with a mutex.
|
|
315
314
|
// See: https://github.com/mattrobenolt/ps-http-sim/issues/7
|
|
316
|
-
|
|
315
|
+
#mutex = new Mutex();
|
|
317
316
|
async performIO(query) {
|
|
318
|
-
const release = await this
|
|
317
|
+
const release = await this.#mutex.acquire();
|
|
319
318
|
try {
|
|
320
319
|
return await super.performIO(query);
|
|
321
320
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-planetscale",
|
|
3
|
-
"version": "6.13.0-dev.
|
|
3
|
+
"version": "6.13.0-dev.3",
|
|
4
4
|
"description": "Prisma's driver adapter for \"@planetscale/database\"",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"async-mutex": "0.5.0",
|
|
35
35
|
"@planetscale/database": "^1.15.0",
|
|
36
|
-
"@prisma/driver-adapter-utils": "6.13.0-dev.
|
|
36
|
+
"@prisma/driver-adapter-utils": "6.13.0-dev.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@swc/core": "1.11.5",
|