@prisma/adapter-better-sqlite3 6.13.0-dev.2 → 6.13.0-dev.20
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
|
@@ -464,7 +464,6 @@ function convertDriverError(error) {
|
|
|
464
464
|
|
|
465
465
|
// src/better-sqlite3.ts
|
|
466
466
|
var debug2 = (0, import_driver_adapter_utils2.Debug)("prisma:driver-adapter:better-sqlite3");
|
|
467
|
-
var LOCK_TAG = Symbol();
|
|
468
467
|
var BetterSQLite3Queryable = class {
|
|
469
468
|
constructor(client) {
|
|
470
469
|
this.client = client;
|
|
@@ -560,7 +559,7 @@ var BetterSQLite3Transaction = class extends BetterSQLite3Queryable {
|
|
|
560
559
|
}
|
|
561
560
|
};
|
|
562
561
|
var PrismaBetterSQLite3Adapter = class extends BetterSQLite3Queryable {
|
|
563
|
-
|
|
562
|
+
#mutex = new Mutex();
|
|
564
563
|
constructor(client) {
|
|
565
564
|
super(client);
|
|
566
565
|
}
|
|
@@ -585,7 +584,7 @@ var PrismaBetterSQLite3Adapter = class extends BetterSQLite3Queryable {
|
|
|
585
584
|
const tag = "[js::startTransaction]";
|
|
586
585
|
debug2("%s options: %O", tag, options);
|
|
587
586
|
try {
|
|
588
|
-
const release = await this
|
|
587
|
+
const release = await this.#mutex.acquire();
|
|
589
588
|
this.client.prepare("BEGIN").run();
|
|
590
589
|
return new BetterSQLite3Transaction(this.client, options, release);
|
|
591
590
|
} catch (e) {
|
package/dist/index.mjs
CHANGED
|
@@ -428,7 +428,6 @@ function convertDriverError(error) {
|
|
|
428
428
|
|
|
429
429
|
// src/better-sqlite3.ts
|
|
430
430
|
var debug2 = Debug2("prisma:driver-adapter:better-sqlite3");
|
|
431
|
-
var LOCK_TAG = Symbol();
|
|
432
431
|
var BetterSQLite3Queryable = class {
|
|
433
432
|
constructor(client) {
|
|
434
433
|
this.client = client;
|
|
@@ -524,7 +523,7 @@ var BetterSQLite3Transaction = class extends BetterSQLite3Queryable {
|
|
|
524
523
|
}
|
|
525
524
|
};
|
|
526
525
|
var PrismaBetterSQLite3Adapter = class extends BetterSQLite3Queryable {
|
|
527
|
-
|
|
526
|
+
#mutex = new Mutex();
|
|
528
527
|
constructor(client) {
|
|
529
528
|
super(client);
|
|
530
529
|
}
|
|
@@ -549,7 +548,7 @@ var PrismaBetterSQLite3Adapter = class extends BetterSQLite3Queryable {
|
|
|
549
548
|
const tag = "[js::startTransaction]";
|
|
550
549
|
debug2("%s options: %O", tag, options);
|
|
551
550
|
try {
|
|
552
|
-
const release = await this
|
|
551
|
+
const release = await this.#mutex.acquire();
|
|
553
552
|
this.client.prepare("BEGIN").run();
|
|
554
553
|
return new BetterSQLite3Transaction(this.client, options, release);
|
|
555
554
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-better-sqlite3",
|
|
3
|
-
"version": "6.13.0-dev.
|
|
3
|
+
"version": "6.13.0-dev.20",
|
|
4
4
|
"description": "Prisma's driver adapter for better-sqlite3, a fast SQLite3 driver for JavaScript runtimes",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"sideEffects": false,
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"better-sqlite3": ">= ^11.9.0 < 12",
|
|
35
|
-
"@prisma/driver-adapter-utils": "6.13.0-dev.
|
|
35
|
+
"@prisma/driver-adapter-utils": "6.13.0-dev.20"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/better-sqlite3": "7.6.12",
|