@prisma/adapter-libsql 7.10.0-dev.42 → 7.10.0-dev.44
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-node.js +5 -2
- package/dist/index-node.mjs +5 -2
- package/dist/index-web.js +5 -2
- package/dist/index-web.mjs +5 -2
- package/package.json +2 -2
package/dist/index-node.js
CHANGED
|
@@ -219,10 +219,13 @@ function mapDriverError(error) {
|
|
|
219
219
|
switch (rawCode) {
|
|
220
220
|
case 2067:
|
|
221
221
|
case 1555: {
|
|
222
|
-
const
|
|
222
|
+
const columns = error.message.split("constraint failed: ").at(1)?.split(", ");
|
|
223
|
+
const fields = columns?.map((field) => field.split(".").pop());
|
|
224
|
+
const table = columns?.at(0)?.split(".").slice(0, -1).join(".") || void 0;
|
|
223
225
|
return {
|
|
224
226
|
kind: "UniqueConstraintViolation",
|
|
225
|
-
constraint: fields !== void 0 ? { fields } : void 0
|
|
227
|
+
constraint: fields !== void 0 ? { fields } : void 0,
|
|
228
|
+
table
|
|
226
229
|
};
|
|
227
230
|
}
|
|
228
231
|
case 1299: {
|
package/dist/index-node.mjs
CHANGED
|
@@ -193,10 +193,13 @@ function mapDriverError(error) {
|
|
|
193
193
|
switch (rawCode) {
|
|
194
194
|
case 2067:
|
|
195
195
|
case 1555: {
|
|
196
|
-
const
|
|
196
|
+
const columns = error.message.split("constraint failed: ").at(1)?.split(", ");
|
|
197
|
+
const fields = columns?.map((field) => field.split(".").pop());
|
|
198
|
+
const table = columns?.at(0)?.split(".").slice(0, -1).join(".") || void 0;
|
|
197
199
|
return {
|
|
198
200
|
kind: "UniqueConstraintViolation",
|
|
199
|
-
constraint: fields !== void 0 ? { fields } : void 0
|
|
201
|
+
constraint: fields !== void 0 ? { fields } : void 0,
|
|
202
|
+
table
|
|
200
203
|
};
|
|
201
204
|
}
|
|
202
205
|
case 1299: {
|
package/dist/index-web.js
CHANGED
|
@@ -219,10 +219,13 @@ function mapDriverError(error) {
|
|
|
219
219
|
switch (rawCode) {
|
|
220
220
|
case 2067:
|
|
221
221
|
case 1555: {
|
|
222
|
-
const
|
|
222
|
+
const columns = error.message.split("constraint failed: ").at(1)?.split(", ");
|
|
223
|
+
const fields = columns?.map((field) => field.split(".").pop());
|
|
224
|
+
const table = columns?.at(0)?.split(".").slice(0, -1).join(".") || void 0;
|
|
223
225
|
return {
|
|
224
226
|
kind: "UniqueConstraintViolation",
|
|
225
|
-
constraint: fields !== void 0 ? { fields } : void 0
|
|
227
|
+
constraint: fields !== void 0 ? { fields } : void 0,
|
|
228
|
+
table
|
|
226
229
|
};
|
|
227
230
|
}
|
|
228
231
|
case 1299: {
|
package/dist/index-web.mjs
CHANGED
|
@@ -193,10 +193,13 @@ function mapDriverError(error) {
|
|
|
193
193
|
switch (rawCode) {
|
|
194
194
|
case 2067:
|
|
195
195
|
case 1555: {
|
|
196
|
-
const
|
|
196
|
+
const columns = error.message.split("constraint failed: ").at(1)?.split(", ");
|
|
197
|
+
const fields = columns?.map((field) => field.split(".").pop());
|
|
198
|
+
const table = columns?.at(0)?.split(".").slice(0, -1).join(".") || void 0;
|
|
197
199
|
return {
|
|
198
200
|
kind: "UniqueConstraintViolation",
|
|
199
|
-
constraint: fields !== void 0 ? { fields } : void 0
|
|
201
|
+
constraint: fields !== void 0 ? { fields } : void 0,
|
|
202
|
+
table
|
|
200
203
|
};
|
|
201
204
|
}
|
|
202
205
|
case 1299: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-libsql",
|
|
3
|
-
"version": "7.10.0-dev.
|
|
3
|
+
"version": "7.10.0-dev.44",
|
|
4
4
|
"description": "Prisma's driver adapter for libSQL and Turso",
|
|
5
5
|
"main": "dist/index-node.js",
|
|
6
6
|
"module": "dist/index-node.mjs",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@libsql/client": "^0.17.0",
|
|
45
45
|
"async-mutex": "0.5.0",
|
|
46
|
-
"@prisma/driver-adapter-utils": "7.10.0-dev.
|
|
46
|
+
"@prisma/driver-adapter-utils": "7.10.0-dev.44"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"dev": "DEV=true tsx helpers/build.ts",
|