@prisma/client-engine-runtime 6.9.0-dev.2 → 6.9.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/QueryPlan.d.ts +36 -1
- package/dist/UserFacingError.d.ts +3 -3
- package/dist/index.d.mts +61 -8
- package/dist/index.d.ts +61 -8
- package/dist/index.js +224 -112
- package/dist/index.mjs +220 -112
- package/dist/interpreter/DataMapper.d.ts +3 -0
- package/dist/transactionManager/TransactionManagerErrors.d.ts +4 -4
- package/dist/utils.d.ts +10 -0
- package/package.json +3 -3
package/dist/QueryPlan.d.ts
CHANGED
|
@@ -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
|
|
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';
|
|
@@ -233,11 +267,24 @@ export declare type QueryPlanNode = {
|
|
|
233
267
|
from: QueryPlanNode;
|
|
234
268
|
to: QueryPlanNode;
|
|
235
269
|
};
|
|
270
|
+
} | {
|
|
271
|
+
type: 'distinctBy';
|
|
272
|
+
args: {
|
|
273
|
+
expr: QueryPlanNode;
|
|
274
|
+
fields: string[];
|
|
275
|
+
};
|
|
276
|
+
} | {
|
|
277
|
+
type: 'paginate';
|
|
278
|
+
args: {
|
|
279
|
+
expr: QueryPlanNode;
|
|
280
|
+
pagination: Pagination;
|
|
281
|
+
};
|
|
236
282
|
};
|
|
237
283
|
|
|
238
284
|
export declare type ResultNode = {
|
|
239
285
|
type: 'Object';
|
|
240
286
|
fields: Record<string, ResultNode>;
|
|
287
|
+
flattened: boolean;
|
|
241
288
|
} | {
|
|
242
289
|
type: 'Value';
|
|
243
290
|
dbName: string;
|
|
@@ -277,10 +324,9 @@ export declare class TransactionManager {
|
|
|
277
324
|
private validateOptions;
|
|
278
325
|
}
|
|
279
326
|
|
|
280
|
-
export declare class TransactionManagerError extends
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
constructor(message: string, meta?: Record<string, unknown> | undefined);
|
|
327
|
+
export declare class TransactionManagerError extends UserFacingError {
|
|
328
|
+
name: string;
|
|
329
|
+
constructor(message: string, meta?: Record<string, unknown>);
|
|
284
330
|
}
|
|
285
331
|
|
|
286
332
|
export declare type TransactionOptions = {
|
|
@@ -292,14 +338,14 @@ export declare type TransactionOptions = {
|
|
|
292
338
|
export declare class UserFacingError extends Error {
|
|
293
339
|
name: string;
|
|
294
340
|
code: string;
|
|
295
|
-
meta: unknown
|
|
296
|
-
constructor(message: string, code: string, meta?: unknown);
|
|
341
|
+
meta: Record<string, unknown>;
|
|
342
|
+
constructor(message: string, code: string, meta?: Record<string, unknown>);
|
|
297
343
|
toQueryResponseErrorObject(): {
|
|
298
344
|
error: string;
|
|
299
345
|
user_facing_error: {
|
|
300
346
|
is_panic: boolean;
|
|
301
347
|
message: string;
|
|
302
|
-
meta: unknown
|
|
348
|
+
meta: Record<string, unknown>;
|
|
303
349
|
error_code: string;
|
|
304
350
|
};
|
|
305
351
|
};
|
|
@@ -331,6 +377,13 @@ export declare type ValidationError = {
|
|
|
331
377
|
context: {
|
|
332
378
|
expectedRows: number;
|
|
333
379
|
};
|
|
380
|
+
} | {
|
|
381
|
+
error_identifier: 'INCOMPLETE_CONNECT_OUTPUT';
|
|
382
|
+
context: {
|
|
383
|
+
expectedRows: number;
|
|
384
|
+
relation: string;
|
|
385
|
+
relationType: string;
|
|
386
|
+
};
|
|
334
387
|
} | {
|
|
335
388
|
error_identifier: 'RECORDS_NOT_CONNECTED';
|
|
336
389
|
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';
|
|
@@ -233,11 +267,24 @@ export declare type QueryPlanNode = {
|
|
|
233
267
|
from: QueryPlanNode;
|
|
234
268
|
to: QueryPlanNode;
|
|
235
269
|
};
|
|
270
|
+
} | {
|
|
271
|
+
type: 'distinctBy';
|
|
272
|
+
args: {
|
|
273
|
+
expr: QueryPlanNode;
|
|
274
|
+
fields: string[];
|
|
275
|
+
};
|
|
276
|
+
} | {
|
|
277
|
+
type: 'paginate';
|
|
278
|
+
args: {
|
|
279
|
+
expr: QueryPlanNode;
|
|
280
|
+
pagination: Pagination;
|
|
281
|
+
};
|
|
236
282
|
};
|
|
237
283
|
|
|
238
284
|
export declare type ResultNode = {
|
|
239
285
|
type: 'Object';
|
|
240
286
|
fields: Record<string, ResultNode>;
|
|
287
|
+
flattened: boolean;
|
|
241
288
|
} | {
|
|
242
289
|
type: 'Value';
|
|
243
290
|
dbName: string;
|
|
@@ -277,10 +324,9 @@ export declare class TransactionManager {
|
|
|
277
324
|
private validateOptions;
|
|
278
325
|
}
|
|
279
326
|
|
|
280
|
-
export declare class TransactionManagerError extends
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
constructor(message: string, meta?: Record<string, unknown> | undefined);
|
|
327
|
+
export declare class TransactionManagerError extends UserFacingError {
|
|
328
|
+
name: string;
|
|
329
|
+
constructor(message: string, meta?: Record<string, unknown>);
|
|
284
330
|
}
|
|
285
331
|
|
|
286
332
|
export declare type TransactionOptions = {
|
|
@@ -292,14 +338,14 @@ export declare type TransactionOptions = {
|
|
|
292
338
|
export declare class UserFacingError extends Error {
|
|
293
339
|
name: string;
|
|
294
340
|
code: string;
|
|
295
|
-
meta: unknown
|
|
296
|
-
constructor(message: string, code: string, meta?: unknown);
|
|
341
|
+
meta: Record<string, unknown>;
|
|
342
|
+
constructor(message: string, code: string, meta?: Record<string, unknown>);
|
|
297
343
|
toQueryResponseErrorObject(): {
|
|
298
344
|
error: string;
|
|
299
345
|
user_facing_error: {
|
|
300
346
|
is_panic: boolean;
|
|
301
347
|
message: string;
|
|
302
|
-
meta: unknown
|
|
348
|
+
meta: Record<string, unknown>;
|
|
303
349
|
error_code: string;
|
|
304
350
|
};
|
|
305
351
|
};
|
|
@@ -331,6 +377,13 @@ export declare type ValidationError = {
|
|
|
331
377
|
context: {
|
|
332
378
|
expectedRows: number;
|
|
333
379
|
};
|
|
380
|
+
} | {
|
|
381
|
+
error_identifier: 'INCOMPLETE_CONNECT_OUTPUT';
|
|
382
|
+
context: {
|
|
383
|
+
expectedRows: number;
|
|
384
|
+
relation: string;
|
|
385
|
+
relationType: string;
|
|
386
|
+
};
|
|
334
387
|
} | {
|
|
335
388
|
error_identifier: 'RECORDS_NOT_CONNECTED';
|
|
336
389
|
context: {
|