@prisma/adapter-neon 6.10.0-dev.2 → 6.10.0-dev.4
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 +8 -4
- package/dist/index.mjs +8 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -379,16 +379,20 @@ function convertDriverError(error) {
|
|
|
379
379
|
kind: "LengthMismatch",
|
|
380
380
|
column: error.column
|
|
381
381
|
};
|
|
382
|
-
case "23505":
|
|
382
|
+
case "23505": {
|
|
383
|
+
const fields = error.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ");
|
|
383
384
|
return {
|
|
384
385
|
kind: "UniqueConstraintViolation",
|
|
385
|
-
|
|
386
|
+
constraint: fields !== void 0 ? { fields } : void 0
|
|
386
387
|
};
|
|
387
|
-
|
|
388
|
+
}
|
|
389
|
+
case "23502": {
|
|
390
|
+
const fields = error.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ");
|
|
388
391
|
return {
|
|
389
392
|
kind: "NullConstraintViolation",
|
|
390
|
-
|
|
393
|
+
constraint: fields !== void 0 ? { fields } : void 0
|
|
391
394
|
};
|
|
395
|
+
}
|
|
392
396
|
case "23503": {
|
|
393
397
|
let constraint;
|
|
394
398
|
if (error.column) {
|
package/dist/index.mjs
CHANGED
|
@@ -342,16 +342,20 @@ function convertDriverError(error) {
|
|
|
342
342
|
kind: "LengthMismatch",
|
|
343
343
|
column: error.column
|
|
344
344
|
};
|
|
345
|
-
case "23505":
|
|
345
|
+
case "23505": {
|
|
346
|
+
const fields = error.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ");
|
|
346
347
|
return {
|
|
347
348
|
kind: "UniqueConstraintViolation",
|
|
348
|
-
|
|
349
|
+
constraint: fields !== void 0 ? { fields } : void 0
|
|
349
350
|
};
|
|
350
|
-
|
|
351
|
+
}
|
|
352
|
+
case "23502": {
|
|
353
|
+
const fields = error.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ");
|
|
351
354
|
return {
|
|
352
355
|
kind: "NullConstraintViolation",
|
|
353
|
-
|
|
356
|
+
constraint: fields !== void 0 ? { fields } : void 0
|
|
354
357
|
};
|
|
358
|
+
}
|
|
355
359
|
case "23503": {
|
|
356
360
|
let constraint;
|
|
357
361
|
if (error.column) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-neon",
|
|
3
|
-
"version": "6.10.0-dev.
|
|
3
|
+
"version": "6.10.0-dev.4",
|
|
4
4
|
"description": "Prisma's driver adapter for \"@neondatabase/serverless\"",
|
|
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
|
"postgres-array": "3.0.4",
|
|
35
|
-
"@prisma/driver-adapter-utils": "6.10.0-dev.
|
|
35
|
+
"@prisma/driver-adapter-utils": "6.10.0-dev.4"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@neondatabase/serverless": "0.10.2",
|