@prisma/client-engine-runtime 6.14.0-dev.35 → 6.14.0-dev.37

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.
@@ -0,0 +1,19 @@
1
+ import { QueryPlanNode } from './query-plan';
2
+ export type BatchResponse = MultiBatchResponse | CompactedBatchResponse;
3
+ export type MultiBatchResponse = {
4
+ type: 'multi';
5
+ plans: QueryPlanNode[];
6
+ };
7
+ export type CompactedBatchResponse = {
8
+ type: 'compacted';
9
+ plan: QueryPlanNode;
10
+ arguments: Record<string, {}>[];
11
+ nestedSelection: string[];
12
+ keys: string[];
13
+ expectNonEmpty: boolean;
14
+ };
15
+ /**
16
+ * Converts the result of a compacted query back to result objects analogous to what queries
17
+ * would return when executed individually.
18
+ */
19
+ export declare function convertCompactedRows(rows: {}[], compiledBatch: CompactedBatchResponse): unknown[];
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ConnectionInfo } from '@prisma/driver-adapter-utils';
2
2
  import { Context } from '@opentelemetry/api';
3
+ import { Decimal } from 'decimal.js';
3
4
  import type { IsolationLevel } from '@prisma/driver-adapter-utils';
4
5
  import { Span } from '@opentelemetry/api';
5
6
  import { SpanOptions } from '@opentelemetry/api';
@@ -8,6 +9,8 @@ import { SqlQueryable } from '@prisma/driver-adapter-utils';
8
9
  import { SqlResultSet } from '@prisma/driver-adapter-utils';
9
10
  import { Transaction } from '@prisma/driver-adapter-utils';
10
11
 
12
+ export declare type BatchResponse = MultiBatchResponse | CompactedBatchResponse;
13
+
11
14
  export declare type BigIntTaggedValue = {
12
15
  $type: 'BigInt';
13
16
  value: string;
@@ -18,6 +21,21 @@ export declare type BytesTaggedValue = {
18
21
  value: string;
19
22
  };
20
23
 
24
+ export declare type CompactedBatchResponse = {
25
+ type: 'compacted';
26
+ plan: QueryPlanNode;
27
+ arguments: Record<string, {}>[];
28
+ nestedSelection: string[];
29
+ keys: string[];
30
+ expectNonEmpty: boolean;
31
+ };
32
+
33
+ /**
34
+ * Converts the result of a compacted query back to result objects analogous to what queries
35
+ * would return when executed individually.
36
+ */
37
+ export declare function convertCompactedRows(rows: {}[], compiledBatch: CompactedBatchResponse): unknown[];
38
+
21
39
  export declare class DataMapperError extends Error {
22
40
  name: string;
23
41
  }
@@ -45,6 +63,8 @@ export declare type DecimalTaggedValue = {
45
63
  value: string;
46
64
  };
47
65
 
66
+ export declare function deserializeJsonResponse(result: unknown): unknown;
67
+
48
68
  /**
49
69
  * Checks if two objects representing the names and values of key columns match. A match is
50
70
  * defined by one of the sets of keys being a subset of the other. This function also
@@ -144,6 +164,15 @@ export declare type JsonTaggedValue = {
144
164
  value: string;
145
165
  };
146
166
 
167
+ export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | {
168
+ [key: string]: JsOutputValue;
169
+ };
170
+
171
+ export declare type MultiBatchResponse = {
172
+ type: 'multi';
173
+ plans: QueryPlanNode[];
174
+ };
175
+
147
176
  export declare const noopTracingHelper: TracingHelper;
148
177
 
149
178
  export declare function normalizeJsonProtocolValues(result: unknown): unknown;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ConnectionInfo } from '@prisma/driver-adapter-utils';
2
2
  import { Context } from '@opentelemetry/api';
3
+ import { Decimal } from 'decimal.js';
3
4
  import type { IsolationLevel } from '@prisma/driver-adapter-utils';
4
5
  import { Span } from '@opentelemetry/api';
5
6
  import { SpanOptions } from '@opentelemetry/api';
@@ -8,6 +9,8 @@ import { SqlQueryable } from '@prisma/driver-adapter-utils';
8
9
  import { SqlResultSet } from '@prisma/driver-adapter-utils';
9
10
  import { Transaction } from '@prisma/driver-adapter-utils';
10
11
 
12
+ export declare type BatchResponse = MultiBatchResponse | CompactedBatchResponse;
13
+
11
14
  export declare type BigIntTaggedValue = {
12
15
  $type: 'BigInt';
13
16
  value: string;
@@ -18,6 +21,21 @@ export declare type BytesTaggedValue = {
18
21
  value: string;
19
22
  };
20
23
 
24
+ export declare type CompactedBatchResponse = {
25
+ type: 'compacted';
26
+ plan: QueryPlanNode;
27
+ arguments: Record<string, {}>[];
28
+ nestedSelection: string[];
29
+ keys: string[];
30
+ expectNonEmpty: boolean;
31
+ };
32
+
33
+ /**
34
+ * Converts the result of a compacted query back to result objects analogous to what queries
35
+ * would return when executed individually.
36
+ */
37
+ export declare function convertCompactedRows(rows: {}[], compiledBatch: CompactedBatchResponse): unknown[];
38
+
21
39
  export declare class DataMapperError extends Error {
22
40
  name: string;
23
41
  }
@@ -45,6 +63,8 @@ export declare type DecimalTaggedValue = {
45
63
  value: string;
46
64
  };
47
65
 
66
+ export declare function deserializeJsonResponse(result: unknown): unknown;
67
+
48
68
  /**
49
69
  * Checks if two objects representing the names and values of key columns match. A match is
50
70
  * defined by one of the sets of keys being a subset of the other. This function also
@@ -144,6 +164,15 @@ export declare type JsonTaggedValue = {
144
164
  value: string;
145
165
  };
146
166
 
167
+ export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | {
168
+ [key: string]: JsOutputValue;
169
+ };
170
+
171
+ export declare type MultiBatchResponse = {
172
+ type: 'multi';
173
+ plans: QueryPlanNode[];
174
+ };
175
+
147
176
  export declare const noopTracingHelper: TracingHelper;
148
177
 
149
178
  export declare function normalizeJsonProtocolValues(result: unknown): unknown;