@prisma/adapter-pg 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
@@ -383,16 +383,20 @@ function convertDriverError(error) {
383
383
  kind: "LengthMismatch",
384
384
  column: error.column
385
385
  };
386
- case "23505":
386
+ case "23505": {
387
+ const fields = error.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ");
387
388
  return {
388
389
  kind: "UniqueConstraintViolation",
389
- fields: error.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ") ?? []
390
+ constraint: fields !== void 0 ? { fields } : void 0
390
391
  };
391
- case "23502":
392
+ }
393
+ case "23502": {
394
+ const fields = error.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ");
392
395
  return {
393
396
  kind: "NullConstraintViolation",
394
- fields: error.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ") ?? []
397
+ constraint: fields !== void 0 ? { fields } : void 0
395
398
  };
399
+ }
396
400
  case "23503": {
397
401
  let constraint;
398
402
  if (error.column) {
@@ -605,7 +609,8 @@ var PrismaPgAdapter = class extends PgQueryable {
605
609
  }
606
610
  getConnectionInfo() {
607
611
  return {
608
- schemaName: this.options?.schema
612
+ schemaName: this.options?.schema,
613
+ supportsRelationJoins: true
609
614
  };
610
615
  }
611
616
  async dispose() {
package/dist/index.mjs CHANGED
@@ -347,16 +347,20 @@ function convertDriverError(error) {
347
347
  kind: "LengthMismatch",
348
348
  column: error.column
349
349
  };
350
- case "23505":
350
+ case "23505": {
351
+ const fields = error.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ");
351
352
  return {
352
353
  kind: "UniqueConstraintViolation",
353
- fields: error.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ") ?? []
354
+ constraint: fields !== void 0 ? { fields } : void 0
354
355
  };
355
- case "23502":
356
+ }
357
+ case "23502": {
358
+ const fields = error.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ");
356
359
  return {
357
360
  kind: "NullConstraintViolation",
358
- fields: error.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ") ?? []
361
+ constraint: fields !== void 0 ? { fields } : void 0
359
362
  };
363
+ }
360
364
  case "23503": {
361
365
  let constraint;
362
366
  if (error.column) {
@@ -569,7 +573,8 @@ var PrismaPgAdapter = class extends PgQueryable {
569
573
  }
570
574
  getConnectionInfo() {
571
575
  return {
572
- schemaName: this.options?.schema
576
+ schemaName: this.options?.schema,
577
+ supportsRelationJoins: true
573
578
  };
574
579
  }
575
580
  async dispose() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/adapter-pg",
3
- "version": "6.10.0-dev.2",
3
+ "version": "6.10.0-dev.20",
4
4
  "description": "Prisma's driver adapter for \"pg\"",
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.2"
35
+ "@prisma/driver-adapter-utils": "6.10.0-dev.20"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@swc/core": "1.11.5",