@prisma/adapter-d1 6.10.0-dev.2 → 6.10.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 CHANGED
@@ -192,14 +192,16 @@ function convertDriverError(error) {
192
192
  let stripped = error.message.split("D1_ERROR: ").at(1) ?? error.message;
193
193
  stripped = stripped.split("SqliteError: ").at(1) ?? stripped;
194
194
  if (stripped.startsWith("UNIQUE constraint failed") || stripped.startsWith("PRIMARY KEY constraint failed")) {
195
+ const fields = stripped.split(": ").at(1)?.split(", ").map((field) => field.split(".").pop());
195
196
  return {
196
197
  kind: "UniqueConstraintViolation",
197
- fields: stripped.split(": ").at(1)?.split(", ").map((field) => field.split(".").pop()) ?? []
198
+ constraint: fields !== void 0 ? { fields } : void 0
198
199
  };
199
200
  } else if (stripped.startsWith("NOT NULL constraint failed")) {
201
+ const fields = stripped.split(": ").at(1)?.split(", ").map((field) => field.split(".").pop());
200
202
  return {
201
203
  kind: "NullConstraintViolation",
202
- fields: stripped.split(": ").at(1)?.split(", ").map((field) => field.split(".").pop()) ?? []
204
+ constraint: fields !== void 0 ? { fields } : void 0
203
205
  };
204
206
  } else if (stripped.startsWith("FOREIGN KEY constraint failed") || stripped.startsWith("CHECK constraint failed")) {
205
207
  return {
@@ -376,7 +378,8 @@ var PrismaD1Adapter = class extends D1Queryable {
376
378
  }
377
379
  getConnectionInfo() {
378
380
  return {
379
- maxBindValues: MAX_BIND_VALUES
381
+ maxBindValues: MAX_BIND_VALUES,
382
+ supportsRelationJoins: false
380
383
  };
381
384
  }
382
385
  async startTransaction(isolationLevel) {
@@ -581,7 +584,8 @@ var PrismaD1HTTPAdapter = class extends D1HTTPQueryable {
581
584
  }
582
585
  getConnectionInfo() {
583
586
  return {
584
- maxBindValues: MAX_BIND_VALUES
587
+ maxBindValues: MAX_BIND_VALUES,
588
+ supportsRelationJoins: false
585
589
  };
586
590
  }
587
591
  async startTransaction(isolationLevel) {
package/dist/index.mjs CHANGED
@@ -158,14 +158,16 @@ function convertDriverError(error) {
158
158
  let stripped = error.message.split("D1_ERROR: ").at(1) ?? error.message;
159
159
  stripped = stripped.split("SqliteError: ").at(1) ?? stripped;
160
160
  if (stripped.startsWith("UNIQUE constraint failed") || stripped.startsWith("PRIMARY KEY constraint failed")) {
161
+ const fields = stripped.split(": ").at(1)?.split(", ").map((field) => field.split(".").pop());
161
162
  return {
162
163
  kind: "UniqueConstraintViolation",
163
- fields: stripped.split(": ").at(1)?.split(", ").map((field) => field.split(".").pop()) ?? []
164
+ constraint: fields !== void 0 ? { fields } : void 0
164
165
  };
165
166
  } else if (stripped.startsWith("NOT NULL constraint failed")) {
167
+ const fields = stripped.split(": ").at(1)?.split(", ").map((field) => field.split(".").pop());
166
168
  return {
167
169
  kind: "NullConstraintViolation",
168
- fields: stripped.split(": ").at(1)?.split(", ").map((field) => field.split(".").pop()) ?? []
170
+ constraint: fields !== void 0 ? { fields } : void 0
169
171
  };
170
172
  } else if (stripped.startsWith("FOREIGN KEY constraint failed") || stripped.startsWith("CHECK constraint failed")) {
171
173
  return {
@@ -342,7 +344,8 @@ var PrismaD1Adapter = class extends D1Queryable {
342
344
  }
343
345
  getConnectionInfo() {
344
346
  return {
345
- maxBindValues: MAX_BIND_VALUES
347
+ maxBindValues: MAX_BIND_VALUES,
348
+ supportsRelationJoins: false
346
349
  };
347
350
  }
348
351
  async startTransaction(isolationLevel) {
@@ -550,7 +553,8 @@ var PrismaD1HTTPAdapter = class extends D1HTTPQueryable {
550
553
  }
551
554
  getConnectionInfo() {
552
555
  return {
553
- maxBindValues: MAX_BIND_VALUES
556
+ maxBindValues: MAX_BIND_VALUES,
557
+ supportsRelationJoins: false
554
558
  };
555
559
  }
556
560
  async startTransaction(isolationLevel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/adapter-d1",
3
- "version": "6.10.0-dev.2",
3
+ "version": "6.10.0-dev.20",
4
4
  "description": "Prisma's driver adapter for Cloudflare D1",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@cloudflare/workers-types": "4.20250214.0",
39
39
  "ky": "1.7.5",
40
- "@prisma/driver-adapter-utils": "6.10.0-dev.2"
40
+ "@prisma/driver-adapter-utils": "6.10.0-dev.20"
41
41
  },
42
42
  "scripts": {
43
43
  "dev": "DEV=true tsx helpers/build.ts",