@prisma/client-engine-runtime 6.9.0-dev.2 → 6.9.0-dev.21

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.
@@ -19,7 +19,12 @@ export type PrismaValueBytes = {
19
19
  prisma__value: string;
20
20
  };
21
21
  export declare function isPrismaValueBytes(value: unknown): value is PrismaValueBytes;
22
- export type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes;
22
+ export type PrismaValueBigInt = {
23
+ prisma__type: 'bigint';
24
+ prisma__value: string;
25
+ };
26
+ export declare function isPrismaValueBigInt(value: unknown): value is PrismaValueBigInt;
27
+ export type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes | PrismaValueBigInt;
23
28
  export type PrismaValueType = {
24
29
  type: 'Any';
25
30
  } | {
@@ -47,6 +52,7 @@ export type PrismaValueType = {
47
52
  export type ResultNode = {
48
53
  type: 'Object';
49
54
  fields: Record<string, ResultNode>;
55
+ flattened: boolean;
50
56
  } | {
51
57
  type: 'Value';
52
58
  dbName: string;
@@ -84,6 +90,7 @@ export type JoinExpression = {
84
90
  child: QueryPlanNode;
85
91
  on: [left: string, right: string][];
86
92
  parentField: string;
93
+ isRelationUnique: boolean;
87
94
  };
88
95
  export type QueryPlanNode = {
89
96
  type: 'seq';
@@ -168,6 +175,24 @@ export type QueryPlanNode = {
168
175
  from: QueryPlanNode;
169
176
  to: QueryPlanNode;
170
177
  };
178
+ } | {
179
+ type: 'distinctBy';
180
+ args: {
181
+ expr: QueryPlanNode;
182
+ fields: string[];
183
+ };
184
+ } | {
185
+ type: 'paginate';
186
+ args: {
187
+ expr: QueryPlanNode;
188
+ pagination: Pagination;
189
+ };
190
+ };
191
+ export type Pagination = {
192
+ cursor: Record<string, PrismaValue> | null;
193
+ take: number | null;
194
+ skip: number | null;
195
+ linkingFields: string[] | null;
171
196
  };
172
197
  export type DataRule = {
173
198
  type: 'rowCountEq';
@@ -175,6 +200,9 @@ export type DataRule = {
175
200
  } | {
176
201
  type: 'rowCountNeq';
177
202
  args: number;
203
+ } | {
204
+ type: 'affectedRowCountEq';
205
+ args: number;
178
206
  } | {
179
207
  type: 'never';
180
208
  };
@@ -204,6 +232,13 @@ export type ValidationError = {
204
232
  context: {
205
233
  expectedRows: number;
206
234
  };
235
+ } | {
236
+ error_identifier: 'INCOMPLETE_CONNECT_OUTPUT';
237
+ context: {
238
+ expectedRows: number;
239
+ relation: string;
240
+ relationType: string;
241
+ };
207
242
  } | {
208
243
  error_identifier: 'RECORDS_NOT_CONNECTED';
209
244
  context: {
@@ -1,14 +1,14 @@
1
1
  export declare class UserFacingError extends Error {
2
2
  name: string;
3
3
  code: string;
4
- meta: unknown;
5
- constructor(message: string, code: string, meta?: unknown);
4
+ meta: Record<string, unknown>;
5
+ constructor(message: string, code: string, meta?: Record<string, unknown>);
6
6
  toQueryResponseErrorObject(): {
7
7
  error: string;
8
8
  user_facing_error: {
9
9
  is_panic: boolean;
10
10
  message: string;
11
- meta: unknown;
11
+ meta: Record<string, unknown>;
12
12
  error_code: string;
13
13
  };
14
14
  };
package/dist/index.d.mts CHANGED
@@ -7,16 +7,30 @@ import { SqlQueryable } from '@prisma/driver-adapter-utils';
7
7
  import { SqlResultSet } from '@prisma/driver-adapter-utils';
8
8
  import { Transaction } from '@prisma/driver-adapter-utils';
9
9
 
10
+ export declare class DataMapperError extends Error {
11
+ name: string;
12
+ }
13
+
10
14
  export declare type DataRule = {
11
15
  type: 'rowCountEq';
12
16
  args: number;
13
17
  } | {
14
18
  type: 'rowCountNeq';
15
19
  args: number;
20
+ } | {
21
+ type: 'affectedRowCountEq';
22
+ args: number;
16
23
  } | {
17
24
  type: 'never';
18
25
  };
19
26
 
27
+ /**
28
+ * Checks if two objects representing the names and values of key columns match. A match is
29
+ * defined by one of the sets of keys being a subset of the other. This function also
30
+ * converts arguments to the types used by driver adapters if necessary.
31
+ */
32
+ export declare function doKeysMatch(lhs: {}, rhs: {}): boolean;
33
+
20
34
  declare type ExtendedSpanOptions = SpanOptions & {
21
35
  name: string;
22
36
  };
@@ -32,6 +46,13 @@ export declare type Fragment = {
32
46
  type: 'parameterTupleList';
33
47
  };
34
48
 
49
+ /**
50
+ * Checks if two objects are deeply equal, recursively checking all properties for strict equality.
51
+ */
52
+ export declare function isDeepStrictEqual(a: unknown, b: unknown): boolean;
53
+
54
+ export declare function isPrismaValueBigInt(value: unknown): value is PrismaValueBigInt;
55
+
35
56
  export declare function isPrismaValueBytes(value: unknown): value is PrismaValueBytes;
36
57
 
37
58
  export declare function isPrismaValueGenerator(value: unknown): value is PrismaValueGenerator;
@@ -42,16 +63,29 @@ export declare type JoinExpression = {
42
63
  child: QueryPlanNode;
43
64
  on: [left: string, right: string][];
44
65
  parentField: string;
66
+ isRelationUnique: boolean;
45
67
  };
46
68
 
47
69
  export declare const noopTracingHelper: TracingHelper;
48
70
 
71
+ export declare type Pagination = {
72
+ cursor: Record<string, PrismaValue> | null;
73
+ take: number | null;
74
+ skip: number | null;
75
+ linkingFields: string[] | null;
76
+ };
77
+
49
78
  export declare interface PlaceholderFormat {
50
79
  prefix: string;
51
80
  hasNumbering: boolean;
52
81
  }
53
82
 
54
- export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes;
83
+ export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes | PrismaValueBigInt;
84
+
85
+ export declare type PrismaValueBigInt = {
86
+ prisma__type: 'bigint';
87
+ prisma__value: string;
88
+ };
55
89
 
56
90
  export declare type PrismaValueBytes = {
57
91
  prisma__type: 'bytes';
@@ -108,7 +142,7 @@ export declare type QueryEvent = {
108
142
 
109
143
  export declare class QueryInterpreter {
110
144
  #private;
111
- constructor({ transactionManager, placeholderValues, onQuery, tracingHelper, serializer }: QueryInterpreterOptions);
145
+ constructor({ transactionManager, placeholderValues, onQuery, tracingHelper, serializer, rawSerializer, }: QueryInterpreterOptions);
112
146
  static forSql(options: {
113
147
  transactionManager: QueryInterpreterTransactionManager;
114
148
  placeholderValues: Record<string, unknown>;
@@ -125,6 +159,7 @@ export declare type QueryInterpreterOptions = {
125
159
  onQuery?: (event: QueryEvent) => void;
126
160
  tracingHelper: TracingHelper;
127
161
  serializer: (results: SqlResultSet) => Value;
162
+ rawSerializer?: (results: SqlResultSet) => Value;
128
163
  };
129
164
 
130
165
  export declare type QueryInterpreterTransactionManager = {
@@ -233,11 +268,24 @@ export declare type QueryPlanNode = {
233
268
  from: QueryPlanNode;
234
269
  to: QueryPlanNode;
235
270
  };
271
+ } | {
272
+ type: 'distinctBy';
273
+ args: {
274
+ expr: QueryPlanNode;
275
+ fields: string[];
276
+ };
277
+ } | {
278
+ type: 'paginate';
279
+ args: {
280
+ expr: QueryPlanNode;
281
+ pagination: Pagination;
282
+ };
236
283
  };
237
284
 
238
285
  export declare type ResultNode = {
239
286
  type: 'Object';
240
287
  fields: Record<string, ResultNode>;
288
+ flattened: boolean;
241
289
  } | {
242
290
  type: 'Value';
243
291
  dbName: string;
@@ -277,10 +325,9 @@ export declare class TransactionManager {
277
325
  private validateOptions;
278
326
  }
279
327
 
280
- export declare class TransactionManagerError extends Error {
281
- meta?: Record<string, unknown> | undefined;
282
- code: string;
283
- constructor(message: string, meta?: Record<string, unknown> | undefined);
328
+ export declare class TransactionManagerError extends UserFacingError {
329
+ name: string;
330
+ constructor(message: string, meta?: Record<string, unknown>);
284
331
  }
285
332
 
286
333
  export declare type TransactionOptions = {
@@ -292,14 +339,14 @@ export declare type TransactionOptions = {
292
339
  export declare class UserFacingError extends Error {
293
340
  name: string;
294
341
  code: string;
295
- meta: unknown;
296
- constructor(message: string, code: string, meta?: unknown);
342
+ meta: Record<string, unknown>;
343
+ constructor(message: string, code: string, meta?: Record<string, unknown>);
297
344
  toQueryResponseErrorObject(): {
298
345
  error: string;
299
346
  user_facing_error: {
300
347
  is_panic: boolean;
301
348
  message: string;
302
- meta: unknown;
349
+ meta: Record<string, unknown>;
303
350
  error_code: string;
304
351
  };
305
352
  };
@@ -331,6 +378,13 @@ export declare type ValidationError = {
331
378
  context: {
332
379
  expectedRows: number;
333
380
  };
381
+ } | {
382
+ error_identifier: 'INCOMPLETE_CONNECT_OUTPUT';
383
+ context: {
384
+ expectedRows: number;
385
+ relation: string;
386
+ relationType: string;
387
+ };
334
388
  } | {
335
389
  error_identifier: 'RECORDS_NOT_CONNECTED';
336
390
  context: {
package/dist/index.d.ts CHANGED
@@ -7,16 +7,30 @@ import { SqlQueryable } from '@prisma/driver-adapter-utils';
7
7
  import { SqlResultSet } from '@prisma/driver-adapter-utils';
8
8
  import { Transaction } from '@prisma/driver-adapter-utils';
9
9
 
10
+ export declare class DataMapperError extends Error {
11
+ name: string;
12
+ }
13
+
10
14
  export declare type DataRule = {
11
15
  type: 'rowCountEq';
12
16
  args: number;
13
17
  } | {
14
18
  type: 'rowCountNeq';
15
19
  args: number;
20
+ } | {
21
+ type: 'affectedRowCountEq';
22
+ args: number;
16
23
  } | {
17
24
  type: 'never';
18
25
  };
19
26
 
27
+ /**
28
+ * Checks if two objects representing the names and values of key columns match. A match is
29
+ * defined by one of the sets of keys being a subset of the other. This function also
30
+ * converts arguments to the types used by driver adapters if necessary.
31
+ */
32
+ export declare function doKeysMatch(lhs: {}, rhs: {}): boolean;
33
+
20
34
  declare type ExtendedSpanOptions = SpanOptions & {
21
35
  name: string;
22
36
  };
@@ -32,6 +46,13 @@ export declare type Fragment = {
32
46
  type: 'parameterTupleList';
33
47
  };
34
48
 
49
+ /**
50
+ * Checks if two objects are deeply equal, recursively checking all properties for strict equality.
51
+ */
52
+ export declare function isDeepStrictEqual(a: unknown, b: unknown): boolean;
53
+
54
+ export declare function isPrismaValueBigInt(value: unknown): value is PrismaValueBigInt;
55
+
35
56
  export declare function isPrismaValueBytes(value: unknown): value is PrismaValueBytes;
36
57
 
37
58
  export declare function isPrismaValueGenerator(value: unknown): value is PrismaValueGenerator;
@@ -42,16 +63,29 @@ export declare type JoinExpression = {
42
63
  child: QueryPlanNode;
43
64
  on: [left: string, right: string][];
44
65
  parentField: string;
66
+ isRelationUnique: boolean;
45
67
  };
46
68
 
47
69
  export declare const noopTracingHelper: TracingHelper;
48
70
 
71
+ export declare type Pagination = {
72
+ cursor: Record<string, PrismaValue> | null;
73
+ take: number | null;
74
+ skip: number | null;
75
+ linkingFields: string[] | null;
76
+ };
77
+
49
78
  export declare interface PlaceholderFormat {
50
79
  prefix: string;
51
80
  hasNumbering: boolean;
52
81
  }
53
82
 
54
- export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes;
83
+ export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes | PrismaValueBigInt;
84
+
85
+ export declare type PrismaValueBigInt = {
86
+ prisma__type: 'bigint';
87
+ prisma__value: string;
88
+ };
55
89
 
56
90
  export declare type PrismaValueBytes = {
57
91
  prisma__type: 'bytes';
@@ -108,7 +142,7 @@ export declare type QueryEvent = {
108
142
 
109
143
  export declare class QueryInterpreter {
110
144
  #private;
111
- constructor({ transactionManager, placeholderValues, onQuery, tracingHelper, serializer }: QueryInterpreterOptions);
145
+ constructor({ transactionManager, placeholderValues, onQuery, tracingHelper, serializer, rawSerializer, }: QueryInterpreterOptions);
112
146
  static forSql(options: {
113
147
  transactionManager: QueryInterpreterTransactionManager;
114
148
  placeholderValues: Record<string, unknown>;
@@ -125,6 +159,7 @@ export declare type QueryInterpreterOptions = {
125
159
  onQuery?: (event: QueryEvent) => void;
126
160
  tracingHelper: TracingHelper;
127
161
  serializer: (results: SqlResultSet) => Value;
162
+ rawSerializer?: (results: SqlResultSet) => Value;
128
163
  };
129
164
 
130
165
  export declare type QueryInterpreterTransactionManager = {
@@ -233,11 +268,24 @@ export declare type QueryPlanNode = {
233
268
  from: QueryPlanNode;
234
269
  to: QueryPlanNode;
235
270
  };
271
+ } | {
272
+ type: 'distinctBy';
273
+ args: {
274
+ expr: QueryPlanNode;
275
+ fields: string[];
276
+ };
277
+ } | {
278
+ type: 'paginate';
279
+ args: {
280
+ expr: QueryPlanNode;
281
+ pagination: Pagination;
282
+ };
236
283
  };
237
284
 
238
285
  export declare type ResultNode = {
239
286
  type: 'Object';
240
287
  fields: Record<string, ResultNode>;
288
+ flattened: boolean;
241
289
  } | {
242
290
  type: 'Value';
243
291
  dbName: string;
@@ -277,10 +325,9 @@ export declare class TransactionManager {
277
325
  private validateOptions;
278
326
  }
279
327
 
280
- export declare class TransactionManagerError extends Error {
281
- meta?: Record<string, unknown> | undefined;
282
- code: string;
283
- constructor(message: string, meta?: Record<string, unknown> | undefined);
328
+ export declare class TransactionManagerError extends UserFacingError {
329
+ name: string;
330
+ constructor(message: string, meta?: Record<string, unknown>);
284
331
  }
285
332
 
286
333
  export declare type TransactionOptions = {
@@ -292,14 +339,14 @@ export declare type TransactionOptions = {
292
339
  export declare class UserFacingError extends Error {
293
340
  name: string;
294
341
  code: string;
295
- meta: unknown;
296
- constructor(message: string, code: string, meta?: unknown);
342
+ meta: Record<string, unknown>;
343
+ constructor(message: string, code: string, meta?: Record<string, unknown>);
297
344
  toQueryResponseErrorObject(): {
298
345
  error: string;
299
346
  user_facing_error: {
300
347
  is_panic: boolean;
301
348
  message: string;
302
- meta: unknown;
349
+ meta: Record<string, unknown>;
303
350
  error_code: string;
304
351
  };
305
352
  };
@@ -331,6 +378,13 @@ export declare type ValidationError = {
331
378
  context: {
332
379
  expectedRows: number;
333
380
  };
381
+ } | {
382
+ error_identifier: 'INCOMPLETE_CONNECT_OUTPUT';
383
+ context: {
384
+ expectedRows: number;
385
+ relation: string;
386
+ relationType: string;
387
+ };
334
388
  } | {
335
389
  error_identifier: 'RECORDS_NOT_CONNECTED';
336
390
  context: {