@prisma/client-engine-runtime 6.15.0-dev.2 → 6.15.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.
package/dist/index.d.mts CHANGED
@@ -1,3 +1,5 @@
1
+ import { ArgType } from '@prisma/driver-adapter-utils';
2
+ import { Arity } from '@prisma/driver-adapter-utils';
1
3
  import { ConnectionInfo } from '@prisma/driver-adapter-utils';
2
4
  import { Context } from '@opentelemetry/api';
3
5
  import { Decimal } from 'decimal.js';
@@ -72,6 +74,11 @@ export declare function deserializeJsonResponse(result: unknown): unknown;
72
74
  */
73
75
  export declare function doKeysMatch(lhs: {}, rhs: {}): boolean;
74
76
 
77
+ export declare type DynamicArgType = ArgType | {
78
+ arity: 'tuple';
79
+ elements: ArgType[];
80
+ };
81
+
75
82
  export declare type EnumTaggedValue = {
76
83
  $type: 'Enum';
77
84
  value: string;
@@ -112,6 +119,20 @@ export declare type FieldRefTaggedValue = {
112
119
  };
113
120
  };
114
121
 
122
+ export declare type FieldScalarType = {
123
+ type: 'string' | 'int' | 'bigint' | 'float' | 'boolean' | 'json' | 'object' | 'datetime' | 'decimal' | 'unsupported';
124
+ } | {
125
+ type: 'enum';
126
+ name: string;
127
+ } | {
128
+ type: 'bytes';
129
+ encoding: 'array' | 'base64' | 'hex';
130
+ };
131
+
132
+ export declare type FieldType = {
133
+ arity: Arity;
134
+ } & FieldScalarType;
135
+
115
136
  export declare type Fragment = {
116
137
  type: 'stringChunk';
117
138
  chunk: string;
@@ -140,10 +161,6 @@ export declare type InMemoryOps = {
140
161
  */
141
162
  export declare function isDeepStrictEqual(a: unknown, b: unknown): boolean;
142
163
 
143
- export declare function isPrismaValueBigInt(value: unknown): value is PrismaValueBigInt;
144
-
145
- export declare function isPrismaValueBytes(value: unknown): value is PrismaValueBytes;
146
-
147
164
  export declare function isPrismaValueGenerator(value: unknown): value is PrismaValueGenerator;
148
165
 
149
166
  export declare function isPrismaValuePlaceholder(value: unknown): value is PrismaValuePlaceholder;
@@ -190,17 +207,7 @@ export declare interface PlaceholderFormat {
190
207
  hasNumbering: boolean;
191
208
  }
192
209
 
193
- export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes | PrismaValueBigInt;
194
-
195
- export declare type PrismaValueBigInt = {
196
- prisma__type: 'bigint';
197
- prisma__value: string;
198
- };
199
-
200
- export declare type PrismaValueBytes = {
201
- prisma__type: 'bytes';
202
- prisma__value: string;
203
- };
210
+ export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator;
204
211
 
205
212
  export declare type PrismaValueGenerator = {
206
213
  prisma__type: 'generatorCall';
@@ -218,38 +225,6 @@ export declare type PrismaValuePlaceholder = {
218
225
  };
219
226
  };
220
227
 
221
- export declare type PrismaValueType = {
222
- type: 'Any';
223
- } | {
224
- type: 'String';
225
- } | {
226
- type: 'Int';
227
- } | {
228
- type: 'BigInt';
229
- } | {
230
- type: 'Float';
231
- } | {
232
- type: 'Boolean';
233
- } | {
234
- type: 'Decimal';
235
- } | {
236
- type: 'Date';
237
- } | {
238
- type: 'Time';
239
- } | {
240
- type: 'Array';
241
- inner: PrismaValueType;
242
- } | {
243
- type: 'Json';
244
- } | {
245
- type: 'Object';
246
- } | {
247
- type: 'Bytes';
248
- } | {
249
- type: 'Enum';
250
- inner: string;
251
- };
252
-
253
228
  export declare type QueryEvent = {
254
229
  timestamp: Date;
255
230
  query: string;
@@ -298,12 +273,14 @@ export declare type QueryPlanBinding = {
298
273
  export declare type QueryPlanDbQuery = {
299
274
  type: 'rawSql';
300
275
  sql: string;
301
- params: PrismaValue[];
276
+ args: PrismaValue[];
277
+ argTypes: ArgType[];
302
278
  } | {
303
279
  type: 'templateSql';
304
280
  fragments: Fragment[];
305
281
  placeholderFormat: PlaceholderFormat;
306
- params: PrismaValue[];
282
+ args: PrismaValue[];
283
+ argTypes: DynamicArgType[];
307
284
  chunkable: boolean;
308
285
  };
309
286
 
@@ -421,16 +398,16 @@ export declare type RawResponse = {
421
398
  };
422
399
 
423
400
  export declare type ResultNode = {
424
- type: 'AffectedRows';
401
+ type: 'affectedRows';
425
402
  } | {
426
- type: 'Object';
403
+ type: 'object';
427
404
  fields: Record<string, ResultNode>;
428
405
  serializedName: string | null;
429
406
  skipNulls: boolean;
430
407
  } | {
431
- type: 'Value';
408
+ type: 'field';
432
409
  dbName: string;
433
- resultType: PrismaValueType;
410
+ fieldType: FieldType;
434
411
  };
435
412
 
436
413
  /**
@@ -471,12 +448,8 @@ export declare class TransactionManager {
471
448
  startTransaction(options?: TransactionOptions): Promise<TransactionInfo>;
472
449
  commitTransaction(transactionId: string): Promise<void>;
473
450
  rollbackTransaction(transactionId: string): Promise<void>;
474
- getTransaction(txInfo: TransactionInfo, operation: string): Transaction;
475
- private getActiveTransaction;
451
+ getTransaction(txInfo: TransactionInfo, operation: string): Promise<Transaction>;
476
452
  cancelAllTransactions(): Promise<void>;
477
- private startTransactionTimeout;
478
- private closeTransaction;
479
- private validateOptions;
480
453
  }
481
454
 
482
455
  export declare class TransactionManagerError extends UserFacingError {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { ArgType } from '@prisma/driver-adapter-utils';
2
+ import { Arity } from '@prisma/driver-adapter-utils';
1
3
  import { ConnectionInfo } from '@prisma/driver-adapter-utils';
2
4
  import { Context } from '@opentelemetry/api';
3
5
  import { Decimal } from 'decimal.js';
@@ -72,6 +74,11 @@ export declare function deserializeJsonResponse(result: unknown): unknown;
72
74
  */
73
75
  export declare function doKeysMatch(lhs: {}, rhs: {}): boolean;
74
76
 
77
+ export declare type DynamicArgType = ArgType | {
78
+ arity: 'tuple';
79
+ elements: ArgType[];
80
+ };
81
+
75
82
  export declare type EnumTaggedValue = {
76
83
  $type: 'Enum';
77
84
  value: string;
@@ -112,6 +119,20 @@ export declare type FieldRefTaggedValue = {
112
119
  };
113
120
  };
114
121
 
122
+ export declare type FieldScalarType = {
123
+ type: 'string' | 'int' | 'bigint' | 'float' | 'boolean' | 'json' | 'object' | 'datetime' | 'decimal' | 'unsupported';
124
+ } | {
125
+ type: 'enum';
126
+ name: string;
127
+ } | {
128
+ type: 'bytes';
129
+ encoding: 'array' | 'base64' | 'hex';
130
+ };
131
+
132
+ export declare type FieldType = {
133
+ arity: Arity;
134
+ } & FieldScalarType;
135
+
115
136
  export declare type Fragment = {
116
137
  type: 'stringChunk';
117
138
  chunk: string;
@@ -140,10 +161,6 @@ export declare type InMemoryOps = {
140
161
  */
141
162
  export declare function isDeepStrictEqual(a: unknown, b: unknown): boolean;
142
163
 
143
- export declare function isPrismaValueBigInt(value: unknown): value is PrismaValueBigInt;
144
-
145
- export declare function isPrismaValueBytes(value: unknown): value is PrismaValueBytes;
146
-
147
164
  export declare function isPrismaValueGenerator(value: unknown): value is PrismaValueGenerator;
148
165
 
149
166
  export declare function isPrismaValuePlaceholder(value: unknown): value is PrismaValuePlaceholder;
@@ -190,17 +207,7 @@ export declare interface PlaceholderFormat {
190
207
  hasNumbering: boolean;
191
208
  }
192
209
 
193
- export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes | PrismaValueBigInt;
194
-
195
- export declare type PrismaValueBigInt = {
196
- prisma__type: 'bigint';
197
- prisma__value: string;
198
- };
199
-
200
- export declare type PrismaValueBytes = {
201
- prisma__type: 'bytes';
202
- prisma__value: string;
203
- };
210
+ export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator;
204
211
 
205
212
  export declare type PrismaValueGenerator = {
206
213
  prisma__type: 'generatorCall';
@@ -218,38 +225,6 @@ export declare type PrismaValuePlaceholder = {
218
225
  };
219
226
  };
220
227
 
221
- export declare type PrismaValueType = {
222
- type: 'Any';
223
- } | {
224
- type: 'String';
225
- } | {
226
- type: 'Int';
227
- } | {
228
- type: 'BigInt';
229
- } | {
230
- type: 'Float';
231
- } | {
232
- type: 'Boolean';
233
- } | {
234
- type: 'Decimal';
235
- } | {
236
- type: 'Date';
237
- } | {
238
- type: 'Time';
239
- } | {
240
- type: 'Array';
241
- inner: PrismaValueType;
242
- } | {
243
- type: 'Json';
244
- } | {
245
- type: 'Object';
246
- } | {
247
- type: 'Bytes';
248
- } | {
249
- type: 'Enum';
250
- inner: string;
251
- };
252
-
253
228
  export declare type QueryEvent = {
254
229
  timestamp: Date;
255
230
  query: string;
@@ -298,12 +273,14 @@ export declare type QueryPlanBinding = {
298
273
  export declare type QueryPlanDbQuery = {
299
274
  type: 'rawSql';
300
275
  sql: string;
301
- params: PrismaValue[];
276
+ args: PrismaValue[];
277
+ argTypes: ArgType[];
302
278
  } | {
303
279
  type: 'templateSql';
304
280
  fragments: Fragment[];
305
281
  placeholderFormat: PlaceholderFormat;
306
- params: PrismaValue[];
282
+ args: PrismaValue[];
283
+ argTypes: DynamicArgType[];
307
284
  chunkable: boolean;
308
285
  };
309
286
 
@@ -421,16 +398,16 @@ export declare type RawResponse = {
421
398
  };
422
399
 
423
400
  export declare type ResultNode = {
424
- type: 'AffectedRows';
401
+ type: 'affectedRows';
425
402
  } | {
426
- type: 'Object';
403
+ type: 'object';
427
404
  fields: Record<string, ResultNode>;
428
405
  serializedName: string | null;
429
406
  skipNulls: boolean;
430
407
  } | {
431
- type: 'Value';
408
+ type: 'field';
432
409
  dbName: string;
433
- resultType: PrismaValueType;
410
+ fieldType: FieldType;
434
411
  };
435
412
 
436
413
  /**
@@ -471,12 +448,8 @@ export declare class TransactionManager {
471
448
  startTransaction(options?: TransactionOptions): Promise<TransactionInfo>;
472
449
  commitTransaction(transactionId: string): Promise<void>;
473
450
  rollbackTransaction(transactionId: string): Promise<void>;
474
- getTransaction(txInfo: TransactionInfo, operation: string): Transaction;
475
- private getActiveTransaction;
451
+ getTransaction(txInfo: TransactionInfo, operation: string): Promise<Transaction>;
476
452
  cancelAllTransactions(): Promise<void>;
477
- private startTransactionTimeout;
478
- private closeTransaction;
479
- private validateOptions;
480
453
  }
481
454
 
482
455
  export declare class TransactionManagerError extends UserFacingError {