@prisma/client-engine-runtime 6.14.0-dev.3 → 6.14.0-dev.30

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.
@@ -46,6 +46,8 @@ export type PrismaValueType = {
46
46
  } | {
47
47
  type: 'Array';
48
48
  inner: PrismaValueType;
49
+ } | {
50
+ type: 'Json';
49
51
  } | {
50
52
  type: 'Object';
51
53
  } | {
@@ -78,6 +80,7 @@ export type QueryPlanDbQuery = {
78
80
  fragments: Fragment[];
79
81
  placeholderFormat: PlaceholderFormat;
80
82
  params: PrismaValue[];
83
+ chunkable: boolean;
81
84
  };
82
85
  export type Fragment = {
83
86
  type: 'stringChunk';
@@ -190,18 +193,6 @@ export type QueryPlanNode = {
190
193
  from: QueryPlanNode;
191
194
  to: QueryPlanNode;
192
195
  };
193
- } | {
194
- type: 'distinctBy';
195
- args: {
196
- expr: QueryPlanNode;
197
- fields: string[];
198
- };
199
- } | {
200
- type: 'paginate';
201
- args: {
202
- expr: QueryPlanNode;
203
- pagination: Pagination;
204
- };
205
196
  } | {
206
197
  type: 'initializeRecord';
207
198
  args: {
@@ -214,6 +205,12 @@ export type QueryPlanNode = {
214
205
  expr: QueryPlanNode;
215
206
  fields: Record<string, FieldOperation>;
216
207
  };
208
+ } | {
209
+ type: 'process';
210
+ args: {
211
+ expr: QueryPlanNode;
212
+ operations: InMemoryOps;
213
+ };
217
214
  };
218
215
  export type FieldInitializer = {
219
216
  type: 'value';
@@ -241,7 +238,13 @@ export type Pagination = {
241
238
  cursor: Record<string, PrismaValue> | null;
242
239
  take: number | null;
243
240
  skip: number | null;
241
+ };
242
+ export type InMemoryOps = {
243
+ pagination: Pagination | null;
244
+ distinct: string[] | null;
245
+ reverse: boolean;
244
246
  linkingFields: string[] | null;
247
+ nested: Record<string, InMemoryOps>;
245
248
  };
246
249
  export type DataRule = {
247
250
  type: 'rowCountEq';
@@ -14,3 +14,4 @@ export declare class UserFacingError extends Error {
14
14
  };
15
15
  }
16
16
  export declare function rethrowAsUserFacing(error: any): never;
17
+ export declare function rethrowAsUserFacingRawError(error: any): never;
package/dist/index.d.mts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ConnectionInfo } from '@prisma/driver-adapter-utils';
1
2
  import { Context } from '@opentelemetry/api';
2
3
  import type { IsolationLevel } from '@prisma/driver-adapter-utils';
3
4
  import { Span } from '@opentelemetry/api';
@@ -106,6 +107,14 @@ export declare type Fragment = {
106
107
  groupSeparator: string;
107
108
  };
108
109
 
110
+ export declare type InMemoryOps = {
111
+ pagination: Pagination | null;
112
+ distinct: string[] | null;
113
+ reverse: boolean;
114
+ linkingFields: string[] | null;
115
+ nested: Record<string, InMemoryOps>;
116
+ };
117
+
109
118
  /**
110
119
  * Checks if two objects are deeply equal, recursively checking all properties for strict equality.
111
120
  */
@@ -139,11 +148,12 @@ export declare const noopTracingHelper: TracingHelper;
139
148
 
140
149
  export declare function normalizeJsonProtocolValues(result: unknown): unknown;
141
150
 
151
+ export declare function normalizeRawJsonProtocolResponse(response: RawResponse): RawResponse;
152
+
142
153
  export declare type Pagination = {
143
154
  cursor: Record<string, PrismaValue> | null;
144
155
  take: number | null;
145
156
  skip: number | null;
146
- linkingFields: string[] | null;
147
157
  };
148
158
 
149
159
  export declare interface PlaceholderFormat {
@@ -200,6 +210,8 @@ export declare type PrismaValueType = {
200
210
  } | {
201
211
  type: 'Array';
202
212
  inner: PrismaValueType;
213
+ } | {
214
+ type: 'Json';
203
215
  } | {
204
216
  type: 'Object';
205
217
  } | {
@@ -218,13 +230,14 @@ export declare type QueryEvent = {
218
230
 
219
231
  export declare class QueryInterpreter {
220
232
  #private;
221
- constructor({ transactionManager, placeholderValues, onQuery, tracingHelper, serializer, rawSerializer, provider, }: QueryInterpreterOptions);
233
+ constructor({ transactionManager, placeholderValues, onQuery, tracingHelper, serializer, rawSerializer, provider, connectionInfo, }: QueryInterpreterOptions);
222
234
  static forSql(options: {
223
235
  transactionManager: QueryInterpreterTransactionManager;
224
236
  placeholderValues: Record<string, unknown>;
225
237
  onQuery?: (event: QueryEvent) => void;
226
238
  tracingHelper: TracingHelper;
227
239
  provider?: SchemaProvider;
240
+ connectionInfo?: ConnectionInfo;
228
241
  }): QueryInterpreter;
229
242
  run(queryPlan: QueryPlanNode, queryable: SqlQueryable): Promise<unknown>;
230
243
  private interpretNode;
@@ -238,6 +251,7 @@ export declare type QueryInterpreterOptions = {
238
251
  serializer: (results: SqlResultSet) => Value;
239
252
  rawSerializer?: (results: SqlResultSet) => Value;
240
253
  provider?: SchemaProvider;
254
+ connectionInfo?: ConnectionInfo;
241
255
  };
242
256
 
243
257
  export declare type QueryInterpreterTransactionManager = {
@@ -261,6 +275,7 @@ export declare type QueryPlanDbQuery = {
261
275
  fragments: Fragment[];
262
276
  placeholderFormat: PlaceholderFormat;
263
277
  params: PrismaValue[];
278
+ chunkable: boolean;
264
279
  };
265
280
 
266
281
  export declare type QueryPlanNode = {
@@ -350,18 +365,6 @@ export declare type QueryPlanNode = {
350
365
  from: QueryPlanNode;
351
366
  to: QueryPlanNode;
352
367
  };
353
- } | {
354
- type: 'distinctBy';
355
- args: {
356
- expr: QueryPlanNode;
357
- fields: string[];
358
- };
359
- } | {
360
- type: 'paginate';
361
- args: {
362
- expr: QueryPlanNode;
363
- pagination: Pagination;
364
- };
365
368
  } | {
366
369
  type: 'initializeRecord';
367
370
  args: {
@@ -374,6 +377,18 @@ export declare type QueryPlanNode = {
374
377
  expr: QueryPlanNode;
375
378
  fields: Record<string, FieldOperation>;
376
379
  };
380
+ } | {
381
+ type: 'process';
382
+ args: {
383
+ expr: QueryPlanNode;
384
+ operations: InMemoryOps;
385
+ };
386
+ };
387
+
388
+ export declare type RawResponse = {
389
+ columns: string[];
390
+ types: string[];
391
+ rows: unknown[][];
377
392
  };
378
393
 
379
394
  export declare type ResultNode = {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ConnectionInfo } from '@prisma/driver-adapter-utils';
1
2
  import { Context } from '@opentelemetry/api';
2
3
  import type { IsolationLevel } from '@prisma/driver-adapter-utils';
3
4
  import { Span } from '@opentelemetry/api';
@@ -106,6 +107,14 @@ export declare type Fragment = {
106
107
  groupSeparator: string;
107
108
  };
108
109
 
110
+ export declare type InMemoryOps = {
111
+ pagination: Pagination | null;
112
+ distinct: string[] | null;
113
+ reverse: boolean;
114
+ linkingFields: string[] | null;
115
+ nested: Record<string, InMemoryOps>;
116
+ };
117
+
109
118
  /**
110
119
  * Checks if two objects are deeply equal, recursively checking all properties for strict equality.
111
120
  */
@@ -139,11 +148,12 @@ export declare const noopTracingHelper: TracingHelper;
139
148
 
140
149
  export declare function normalizeJsonProtocolValues(result: unknown): unknown;
141
150
 
151
+ export declare function normalizeRawJsonProtocolResponse(response: RawResponse): RawResponse;
152
+
142
153
  export declare type Pagination = {
143
154
  cursor: Record<string, PrismaValue> | null;
144
155
  take: number | null;
145
156
  skip: number | null;
146
- linkingFields: string[] | null;
147
157
  };
148
158
 
149
159
  export declare interface PlaceholderFormat {
@@ -200,6 +210,8 @@ export declare type PrismaValueType = {
200
210
  } | {
201
211
  type: 'Array';
202
212
  inner: PrismaValueType;
213
+ } | {
214
+ type: 'Json';
203
215
  } | {
204
216
  type: 'Object';
205
217
  } | {
@@ -218,13 +230,14 @@ export declare type QueryEvent = {
218
230
 
219
231
  export declare class QueryInterpreter {
220
232
  #private;
221
- constructor({ transactionManager, placeholderValues, onQuery, tracingHelper, serializer, rawSerializer, provider, }: QueryInterpreterOptions);
233
+ constructor({ transactionManager, placeholderValues, onQuery, tracingHelper, serializer, rawSerializer, provider, connectionInfo, }: QueryInterpreterOptions);
222
234
  static forSql(options: {
223
235
  transactionManager: QueryInterpreterTransactionManager;
224
236
  placeholderValues: Record<string, unknown>;
225
237
  onQuery?: (event: QueryEvent) => void;
226
238
  tracingHelper: TracingHelper;
227
239
  provider?: SchemaProvider;
240
+ connectionInfo?: ConnectionInfo;
228
241
  }): QueryInterpreter;
229
242
  run(queryPlan: QueryPlanNode, queryable: SqlQueryable): Promise<unknown>;
230
243
  private interpretNode;
@@ -238,6 +251,7 @@ export declare type QueryInterpreterOptions = {
238
251
  serializer: (results: SqlResultSet) => Value;
239
252
  rawSerializer?: (results: SqlResultSet) => Value;
240
253
  provider?: SchemaProvider;
254
+ connectionInfo?: ConnectionInfo;
241
255
  };
242
256
 
243
257
  export declare type QueryInterpreterTransactionManager = {
@@ -261,6 +275,7 @@ export declare type QueryPlanDbQuery = {
261
275
  fragments: Fragment[];
262
276
  placeholderFormat: PlaceholderFormat;
263
277
  params: PrismaValue[];
278
+ chunkable: boolean;
264
279
  };
265
280
 
266
281
  export declare type QueryPlanNode = {
@@ -350,18 +365,6 @@ export declare type QueryPlanNode = {
350
365
  from: QueryPlanNode;
351
366
  to: QueryPlanNode;
352
367
  };
353
- } | {
354
- type: 'distinctBy';
355
- args: {
356
- expr: QueryPlanNode;
357
- fields: string[];
358
- };
359
- } | {
360
- type: 'paginate';
361
- args: {
362
- expr: QueryPlanNode;
363
- pagination: Pagination;
364
- };
365
368
  } | {
366
369
  type: 'initializeRecord';
367
370
  args: {
@@ -374,6 +377,18 @@ export declare type QueryPlanNode = {
374
377
  expr: QueryPlanNode;
375
378
  fields: Record<string, FieldOperation>;
376
379
  };
380
+ } | {
381
+ type: 'process';
382
+ args: {
383
+ expr: QueryPlanNode;
384
+ operations: InMemoryOps;
385
+ };
386
+ };
387
+
388
+ export declare type RawResponse = {
389
+ columns: string[];
390
+ types: string[];
391
+ rows: unknown[][];
377
392
  };
378
393
 
379
394
  export declare type ResultNode = {