@prisma/client-engine-runtime 7.10.0-dev.12 → 7.10.0-dev.15

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
@@ -226,10 +226,8 @@ function deserializeTaggedValue({ $type, value }) {
226
226
  switch ($type) {
227
227
  case "BigInt":
228
228
  return BigInt(value);
229
- case "Bytes": {
230
- const { buffer, byteOffset, byteLength } = Buffer.from(value, "base64");
231
- return new Uint8Array(buffer, byteOffset, byteLength);
232
- }
229
+ case "Bytes":
230
+ return new Uint8Array(Buffer.from(value, "base64"));
233
231
  case "DateTime":
234
232
  return new Date(value);
235
233
  case "Decimal":
@@ -343,6 +341,7 @@ function getErrorCode(err) {
343
341
  case "UniqueConstraintViolation":
344
342
  return "P2002";
345
343
  case "ForeignKeyConstraintViolation":
344
+ case "RestrictViolation":
346
345
  return "P2003";
347
346
  case "InvalidInputValue":
348
347
  return "P2007";
@@ -415,6 +414,7 @@ function renderErrorMessage(err) {
415
414
  case "UniqueConstraintViolation":
416
415
  return `Unique constraint failed on the ${renderConstraint(err.cause.constraint)}`;
417
416
  case "ForeignKeyConstraintViolation":
417
+ case "RestrictViolation":
418
418
  return `Foreign key constraint violated on the ${renderConstraint(err.cause.constraint)}`;
419
419
  case "UnsupportedNativeDataType":
420
420
  return `Failed to deserialize column of type '${err.cause.type}'. If you're using $queryRaw and this column is explicitly marked as \`Unsupported\` in your Prisma schema, try casting this column to any supported Prisma type such as \`String\`.`;
package/dist/index.mjs CHANGED
@@ -173,10 +173,8 @@ function deserializeTaggedValue({ $type, value }) {
173
173
  switch ($type) {
174
174
  case "BigInt":
175
175
  return BigInt(value);
176
- case "Bytes": {
177
- const { buffer, byteOffset, byteLength } = Buffer.from(value, "base64");
178
- return new Uint8Array(buffer, byteOffset, byteLength);
179
- }
176
+ case "Bytes":
177
+ return new Uint8Array(Buffer.from(value, "base64"));
180
178
  case "DateTime":
181
179
  return new Date(value);
182
180
  case "Decimal":
@@ -290,6 +288,7 @@ function getErrorCode(err) {
290
288
  case "UniqueConstraintViolation":
291
289
  return "P2002";
292
290
  case "ForeignKeyConstraintViolation":
291
+ case "RestrictViolation":
293
292
  return "P2003";
294
293
  case "InvalidInputValue":
295
294
  return "P2007";
@@ -362,6 +361,7 @@ function renderErrorMessage(err) {
362
361
  case "UniqueConstraintViolation":
363
362
  return `Unique constraint failed on the ${renderConstraint(err.cause.constraint)}`;
364
363
  case "ForeignKeyConstraintViolation":
364
+ case "RestrictViolation":
365
365
  return `Foreign key constraint violated on the ${renderConstraint(err.cause.constraint)}`;
366
366
  case "UnsupportedNativeDataType":
367
367
  return `Failed to deserialize column of type '${err.cause.type}'. If you're using $queryRaw and this column is explicitly marked as \`Unsupported\` in your Prisma schema, try casting this column to any supported Prisma type such as \`String\`.`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-engine-runtime",
3
- "version": "7.10.0-dev.12",
3
+ "version": "7.10.0-dev.15",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -31,20 +31,20 @@
31
31
  "nanoid": "5.1.5",
32
32
  "ulid": "3.0.0",
33
33
  "uuid": "14.0.0",
34
- "@prisma/client-runtime-utils": "7.10.0-dev.12",
35
- "@prisma/debug": "7.10.0-dev.12",
36
- "@prisma/driver-adapter-utils": "7.10.0-dev.12",
37
- "@prisma/sqlcommenter": "7.10.0-dev.12",
38
- "@prisma/param-graph": "7.10.0-dev.12",
39
- "@prisma/json-protocol": "7.10.0-dev.12"
34
+ "@prisma/client-runtime-utils": "7.10.0-dev.15",
35
+ "@prisma/debug": "7.10.0-dev.15",
36
+ "@prisma/driver-adapter-utils": "7.10.0-dev.15",
37
+ "@prisma/sqlcommenter": "7.10.0-dev.15",
38
+ "@prisma/param-graph": "7.10.0-dev.15",
39
+ "@prisma/json-protocol": "7.10.0-dev.15"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@codspeed/benchmark.js-plugin": "4.0.0",
43
43
  "@types/benchmark": "2.1.5",
44
44
  "@types/node": "~20.19.24",
45
45
  "benchmark": "2.1.4",
46
- "@prisma/get-dmmf": "7.10.0-dev.12",
47
- "@prisma/param-graph-builder": "7.10.0-dev.12"
46
+ "@prisma/get-dmmf": "7.10.0-dev.15",
47
+ "@prisma/param-graph-builder": "7.10.0-dev.15"
48
48
  },
49
49
  "files": [
50
50
  "dist"