@prisma/adapter-mssql 6.15.0-dev.4 → 6.15.0-dev.5
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.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -0
- package/dist/index.mjs +8 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -469,6 +469,10 @@ var PrismaMssqlAdapter = class extends MssqlQueryable {
|
|
|
469
469
|
const tag = "[js::startTransaction]";
|
|
470
470
|
debug("%s options: %O", tag, options);
|
|
471
471
|
const tx = this.pool.transaction();
|
|
472
|
+
tx.on("error", (err) => {
|
|
473
|
+
debug("Error from pool connection: %O", err);
|
|
474
|
+
this.options?.onConnectionError?.(err);
|
|
475
|
+
});
|
|
472
476
|
try {
|
|
473
477
|
await tx.begin(isolationLevel !== void 0 ? mapIsolationLevel(isolationLevel) : void 0);
|
|
474
478
|
return new MssqlTransaction(tx, options);
|
|
@@ -499,6 +503,10 @@ var PrismaMssqlAdapterFactory = class {
|
|
|
499
503
|
adapterName = name;
|
|
500
504
|
async connect() {
|
|
501
505
|
const pool = new import_mssql2.default.ConnectionPool(this.config);
|
|
506
|
+
pool.on("error", (err) => {
|
|
507
|
+
debug("Error from pool client: %O", err);
|
|
508
|
+
this.options?.onPoolError?.(err);
|
|
509
|
+
});
|
|
502
510
|
await pool.connect();
|
|
503
511
|
return new PrismaMssqlAdapter(pool, this.options);
|
|
504
512
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -436,6 +436,10 @@ var PrismaMssqlAdapter = class extends MssqlQueryable {
|
|
|
436
436
|
const tag = "[js::startTransaction]";
|
|
437
437
|
debug("%s options: %O", tag, options);
|
|
438
438
|
const tx = this.pool.transaction();
|
|
439
|
+
tx.on("error", (err) => {
|
|
440
|
+
debug("Error from pool connection: %O", err);
|
|
441
|
+
this.options?.onConnectionError?.(err);
|
|
442
|
+
});
|
|
439
443
|
try {
|
|
440
444
|
await tx.begin(isolationLevel !== void 0 ? mapIsolationLevel(isolationLevel) : void 0);
|
|
441
445
|
return new MssqlTransaction(tx, options);
|
|
@@ -466,6 +470,10 @@ var PrismaMssqlAdapterFactory = class {
|
|
|
466
470
|
adapterName = name;
|
|
467
471
|
async connect() {
|
|
468
472
|
const pool = new sql2.ConnectionPool(this.config);
|
|
473
|
+
pool.on("error", (err) => {
|
|
474
|
+
debug("Error from pool client: %O", err);
|
|
475
|
+
this.options?.onPoolError?.(err);
|
|
476
|
+
});
|
|
469
477
|
await pool.connect();
|
|
470
478
|
return new PrismaMssqlAdapter(pool, this.options);
|
|
471
479
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-mssql",
|
|
3
|
-
"version": "6.15.0-dev.
|
|
3
|
+
"version": "6.15.0-dev.5",
|
|
4
4
|
"description": "Prisma's driver adapter for \"mssql\"",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"mssql": "^11.0.1",
|
|
35
35
|
"async-mutex": "0.5.0",
|
|
36
|
-
"@prisma/driver-adapter-utils": "6.15.0-dev.
|
|
36
|
+
"@prisma/driver-adapter-utils": "6.15.0-dev.5"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/mssql": "9.1.7",
|