@prisma/adapter-mssql 7.10.0-dev.5 → 7.10.0-dev.57
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 +13 -6
- package/dist/index.mjs +13 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -537,10 +537,11 @@ function mapDriverError(error) {
|
|
|
537
537
|
};
|
|
538
538
|
}
|
|
539
539
|
case 2627: {
|
|
540
|
-
const
|
|
540
|
+
const object = error.message.split(". ").at(1)?.split(" ").pop()?.split("'").at(1);
|
|
541
541
|
return {
|
|
542
542
|
kind: "UniqueConstraintViolation",
|
|
543
|
-
constraint:
|
|
543
|
+
constraint: object ? { index: object } : void 0,
|
|
544
|
+
table: object?.split(".").pop()
|
|
544
545
|
};
|
|
545
546
|
}
|
|
546
547
|
case 547: {
|
|
@@ -551,17 +552,23 @@ function mapDriverError(error) {
|
|
|
551
552
|
};
|
|
552
553
|
}
|
|
553
554
|
case 1505: {
|
|
554
|
-
const
|
|
555
|
+
const segments = error.message.split("'");
|
|
556
|
+
const table = segments.at(1)?.split(".").pop();
|
|
557
|
+
const index = segments.at(3);
|
|
555
558
|
return {
|
|
556
559
|
kind: "UniqueConstraintViolation",
|
|
557
|
-
constraint: index ? { index } : void 0
|
|
560
|
+
constraint: index ? { index } : void 0,
|
|
561
|
+
table
|
|
558
562
|
};
|
|
559
563
|
}
|
|
560
564
|
case 2601: {
|
|
561
|
-
const
|
|
565
|
+
const words = error.message.split(" ");
|
|
566
|
+
const table = words.at(7)?.split("'").at(1)?.split(".").pop();
|
|
567
|
+
const index = words.at(11)?.split("'").at(1);
|
|
562
568
|
return {
|
|
563
569
|
kind: "UniqueConstraintViolation",
|
|
564
|
-
constraint: index ? { index } : void 0
|
|
570
|
+
constraint: index ? { index } : void 0,
|
|
571
|
+
table
|
|
565
572
|
};
|
|
566
573
|
}
|
|
567
574
|
case 2628: {
|
package/dist/index.mjs
CHANGED
|
@@ -507,10 +507,11 @@ function mapDriverError(error) {
|
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
509
|
case 2627: {
|
|
510
|
-
const
|
|
510
|
+
const object = error.message.split(". ").at(1)?.split(" ").pop()?.split("'").at(1);
|
|
511
511
|
return {
|
|
512
512
|
kind: "UniqueConstraintViolation",
|
|
513
|
-
constraint:
|
|
513
|
+
constraint: object ? { index: object } : void 0,
|
|
514
|
+
table: object?.split(".").pop()
|
|
514
515
|
};
|
|
515
516
|
}
|
|
516
517
|
case 547: {
|
|
@@ -521,17 +522,23 @@ function mapDriverError(error) {
|
|
|
521
522
|
};
|
|
522
523
|
}
|
|
523
524
|
case 1505: {
|
|
524
|
-
const
|
|
525
|
+
const segments = error.message.split("'");
|
|
526
|
+
const table = segments.at(1)?.split(".").pop();
|
|
527
|
+
const index = segments.at(3);
|
|
525
528
|
return {
|
|
526
529
|
kind: "UniqueConstraintViolation",
|
|
527
|
-
constraint: index ? { index } : void 0
|
|
530
|
+
constraint: index ? { index } : void 0,
|
|
531
|
+
table
|
|
528
532
|
};
|
|
529
533
|
}
|
|
530
534
|
case 2601: {
|
|
531
|
-
const
|
|
535
|
+
const words = error.message.split(" ");
|
|
536
|
+
const table = words.at(7)?.split("'").at(1)?.split(".").pop();
|
|
537
|
+
const index = words.at(11)?.split("'").at(1);
|
|
532
538
|
return {
|
|
533
539
|
kind: "UniqueConstraintViolation",
|
|
534
|
-
constraint: index ? { index } : void 0
|
|
540
|
+
constraint: index ? { index } : void 0,
|
|
541
|
+
table
|
|
535
542
|
};
|
|
536
543
|
}
|
|
537
544
|
case 2628: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-mssql",
|
|
3
|
-
"version": "7.10.0-dev.
|
|
3
|
+
"version": "7.10.0-dev.57",
|
|
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": "^12.2.0",
|
|
35
35
|
"async-mutex": "0.5.0",
|
|
36
|
-
"@prisma/driver-adapter-utils": "7.10.0-dev.
|
|
36
|
+
"@prisma/driver-adapter-utils": "7.10.0-dev.57"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/mssql": "9.1.8"
|