@prisma/client-engine-runtime 6.9.0-dev.15 → 6.9.0-dev.16

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.
@@ -200,6 +200,9 @@ export type DataRule = {
200
200
  } | {
201
201
  type: 'rowCountNeq';
202
202
  args: number;
203
+ } | {
204
+ type: 'affectedRowCountEq';
205
+ args: number;
203
206
  } | {
204
207
  type: 'never';
205
208
  };
@@ -229,6 +232,13 @@ export type ValidationError = {
229
232
  context: {
230
233
  expectedRows: number;
231
234
  };
235
+ } | {
236
+ error_identifier: 'INCOMPLETE_CONNECT_OUTPUT';
237
+ context: {
238
+ expectedRows: number;
239
+ relation: string;
240
+ relationType: string;
241
+ };
232
242
  } | {
233
243
  error_identifier: 'RECORDS_NOT_CONNECTED';
234
244
  context: {
package/dist/index.d.mts CHANGED
@@ -17,6 +17,9 @@ export declare type DataRule = {
17
17
  } | {
18
18
  type: 'rowCountNeq';
19
19
  args: number;
20
+ } | {
21
+ type: 'affectedRowCountEq';
22
+ args: number;
20
23
  } | {
21
24
  type: 'never';
22
25
  };
@@ -367,6 +370,13 @@ export declare type ValidationError = {
367
370
  context: {
368
371
  expectedRows: number;
369
372
  };
373
+ } | {
374
+ error_identifier: 'INCOMPLETE_CONNECT_OUTPUT';
375
+ context: {
376
+ expectedRows: number;
377
+ relation: string;
378
+ relationType: string;
379
+ };
370
380
  } | {
371
381
  error_identifier: 'RECORDS_NOT_CONNECTED';
372
382
  context: {
package/dist/index.d.ts CHANGED
@@ -17,6 +17,9 @@ export declare type DataRule = {
17
17
  } | {
18
18
  type: 'rowCountNeq';
19
19
  args: number;
20
+ } | {
21
+ type: 'affectedRowCountEq';
22
+ args: number;
20
23
  } | {
21
24
  type: 'never';
22
25
  };
@@ -367,6 +370,13 @@ export declare type ValidationError = {
367
370
  context: {
368
371
  expectedRows: number;
369
372
  };
373
+ } | {
374
+ error_identifier: 'INCOMPLETE_CONNECT_OUTPUT';
375
+ context: {
376
+ expectedRows: number;
377
+ relation: string;
378
+ relationType: string;
379
+ };
370
380
  } | {
371
381
  error_identifier: 'RECORDS_NOT_CONNECTED';
372
382
  context: {
package/dist/index.js CHANGED
@@ -621,6 +621,8 @@ function doesSatisfyRule(data, rule) {
621
621
  return rule.args !== 0;
622
622
  }
623
623
  return rule.args !== 1;
624
+ case "affectedRowCountEq":
625
+ return data === rule.args;
624
626
  case "never":
625
627
  return false;
626
628
  default:
@@ -638,7 +640,9 @@ function renderMessage(data, error) {
638
640
  return `An operation failed because it depends on one or more records that were required but not found. No '${error.context.model}' record${hint} was found for ${error.context.operation} on ${error.context.relationType} relation '${error.context.relation}'.`;
639
641
  }
640
642
  case "INCOMPLETE_CONNECT_INPUT":
641
- return `An operation failed because it depends on one or more records that were required but not found. Expected ${error.context.expectedRows} records to be connected, found only ${Array.isArray(data) ? data.length : 0}.`;
643
+ return `An operation failed because it depends on one or more records that were required but not found. Expected ${error.context.expectedRows} records to be connected, found only ${Array.isArray(data) ? data.length : data}.`;
644
+ case "INCOMPLETE_CONNECT_OUTPUT":
645
+ return `The required connected records were not found. Expected ${error.context.expectedRows} records to be connected after connect operation on ${error.context.relationType} relation '${error.context.relation}', found ${Array.isArray(data) ? data.length : data}.`;
642
646
  case "RECORDS_NOT_CONNECTED":
643
647
  return `The records for relation \`${error.context.relation}\` between the \`${error.context.parent}\` and \`${error.context.child}\` models are not connected.`;
644
648
  default:
@@ -651,6 +655,8 @@ function getErrorCode2(error) {
651
655
  return "P2014";
652
656
  case "RECORDS_NOT_CONNECTED":
653
657
  return "P2017";
658
+ case "INCOMPLETE_CONNECT_OUTPUT":
659
+ return "P2018";
654
660
  case "MISSING_RECORD":
655
661
  case "MISSING_RELATED_RECORD":
656
662
  case "INCOMPLETE_CONNECT_INPUT":
package/dist/index.mjs CHANGED
@@ -575,6 +575,8 @@ function doesSatisfyRule(data, rule) {
575
575
  return rule.args !== 0;
576
576
  }
577
577
  return rule.args !== 1;
578
+ case "affectedRowCountEq":
579
+ return data === rule.args;
578
580
  case "never":
579
581
  return false;
580
582
  default:
@@ -592,7 +594,9 @@ function renderMessage(data, error) {
592
594
  return `An operation failed because it depends on one or more records that were required but not found. No '${error.context.model}' record${hint} was found for ${error.context.operation} on ${error.context.relationType} relation '${error.context.relation}'.`;
593
595
  }
594
596
  case "INCOMPLETE_CONNECT_INPUT":
595
- return `An operation failed because it depends on one or more records that were required but not found. Expected ${error.context.expectedRows} records to be connected, found only ${Array.isArray(data) ? data.length : 0}.`;
597
+ return `An operation failed because it depends on one or more records that were required but not found. Expected ${error.context.expectedRows} records to be connected, found only ${Array.isArray(data) ? data.length : data}.`;
598
+ case "INCOMPLETE_CONNECT_OUTPUT":
599
+ return `The required connected records were not found. Expected ${error.context.expectedRows} records to be connected after connect operation on ${error.context.relationType} relation '${error.context.relation}', found ${Array.isArray(data) ? data.length : data}.`;
596
600
  case "RECORDS_NOT_CONNECTED":
597
601
  return `The records for relation \`${error.context.relation}\` between the \`${error.context.parent}\` and \`${error.context.child}\` models are not connected.`;
598
602
  default:
@@ -605,6 +609,8 @@ function getErrorCode2(error) {
605
609
  return "P2014";
606
610
  case "RECORDS_NOT_CONNECTED":
607
611
  return "P2017";
612
+ case "INCOMPLETE_CONNECT_OUTPUT":
613
+ return "P2018";
608
614
  case "MISSING_RECORD":
609
615
  case "MISSING_RELATED_RECORD":
610
616
  case "INCOMPLETE_CONNECT_INPUT":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-engine-runtime",
3
- "version": "6.9.0-dev.15",
3
+ "version": "6.9.0-dev.16",
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,8 +31,8 @@
31
31
  "nanoid": "5.1.5",
32
32
  "ulid": "3.0.0",
33
33
  "uuid": "11.1.0",
34
- "@prisma/debug": "6.9.0-dev.15",
35
- "@prisma/driver-adapter-utils": "6.9.0-dev.15"
34
+ "@prisma/debug": "6.9.0-dev.16",
35
+ "@prisma/driver-adapter-utils": "6.9.0-dev.16"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/jest": "29.5.14",