@prisma/client-engine-runtime 6.12.0-dev.22 → 6.12.0-dev.23

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
@@ -7,16 +7,6 @@ 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 type BigIntTaggedValue = {
11
- $type: 'BigInt';
12
- value: string;
13
- };
14
-
15
- export declare type BytesTaggedValue = {
16
- $type: 'Bytes';
17
- value: string;
18
- };
19
-
20
10
  export declare class DataMapperError extends Error {
21
11
  name: string;
22
12
  }
@@ -34,16 +24,6 @@ export declare type DataRule = {
34
24
  type: 'never';
35
25
  };
36
26
 
37
- export declare type DateTaggedValue = {
38
- $type: 'DateTime';
39
- value: string;
40
- };
41
-
42
- export declare type DecimalTaggedValue = {
43
- $type: 'Decimal';
44
- value: string;
45
- };
46
-
47
27
  /**
48
28
  * Checks if two objects representing the names and values of key columns match. A match is
49
29
  * defined by one of the sets of keys being a subset of the other. This function also
@@ -51,11 +31,6 @@ export declare type DecimalTaggedValue = {
51
31
  */
52
32
  export declare function doKeysMatch(lhs: {}, rhs: {}): boolean;
53
33
 
54
- export declare type EnumTaggedValue = {
55
- $type: 'Enum';
56
- value: string;
57
- };
58
-
59
34
  declare type ExtendedSpanOptions = SpanOptions & {
60
35
  name: string;
61
36
  };
@@ -84,13 +59,6 @@ export declare type FieldOperation = {
84
59
  value: PrismaValue;
85
60
  };
86
61
 
87
- export declare type FieldRefTaggedValue = {
88
- $type: 'FieldRef';
89
- value: {
90
- _ref: string;
91
- };
92
- };
93
-
94
62
  export declare type Fragment = {
95
63
  type: 'stringChunk';
96
64
  chunk: string;
@@ -126,19 +94,8 @@ export declare type JoinExpression = {
126
94
  isRelationUnique: boolean;
127
95
  };
128
96
 
129
- export declare type JsonInputTaggedValue = DateTaggedValue | DecimalTaggedValue | BytesTaggedValue | BigIntTaggedValue | FieldRefTaggedValue | JsonTaggedValue | EnumTaggedValue;
130
-
131
- export declare type JsonOutputTaggedValue = DateTaggedValue | DecimalTaggedValue | BytesTaggedValue | BigIntTaggedValue | JsonTaggedValue;
132
-
133
- export declare type JsonTaggedValue = {
134
- $type: 'Json';
135
- value: string;
136
- };
137
-
138
97
  export declare const noopTracingHelper: TracingHelper;
139
98
 
140
- export declare function normalizeJsonProtocolValues(result: unknown): unknown;
141
-
142
99
  export declare type Pagination = {
143
100
  cursor: Record<string, PrismaValue> | null;
144
101
  take: number | null;
package/dist/index.d.ts CHANGED
@@ -7,16 +7,6 @@ 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 type BigIntTaggedValue = {
11
- $type: 'BigInt';
12
- value: string;
13
- };
14
-
15
- export declare type BytesTaggedValue = {
16
- $type: 'Bytes';
17
- value: string;
18
- };
19
-
20
10
  export declare class DataMapperError extends Error {
21
11
  name: string;
22
12
  }
@@ -34,16 +24,6 @@ export declare type DataRule = {
34
24
  type: 'never';
35
25
  };
36
26
 
37
- export declare type DateTaggedValue = {
38
- $type: 'DateTime';
39
- value: string;
40
- };
41
-
42
- export declare type DecimalTaggedValue = {
43
- $type: 'Decimal';
44
- value: string;
45
- };
46
-
47
27
  /**
48
28
  * Checks if two objects representing the names and values of key columns match. A match is
49
29
  * defined by one of the sets of keys being a subset of the other. This function also
@@ -51,11 +31,6 @@ export declare type DecimalTaggedValue = {
51
31
  */
52
32
  export declare function doKeysMatch(lhs: {}, rhs: {}): boolean;
53
33
 
54
- export declare type EnumTaggedValue = {
55
- $type: 'Enum';
56
- value: string;
57
- };
58
-
59
34
  declare type ExtendedSpanOptions = SpanOptions & {
60
35
  name: string;
61
36
  };
@@ -84,13 +59,6 @@ export declare type FieldOperation = {
84
59
  value: PrismaValue;
85
60
  };
86
61
 
87
- export declare type FieldRefTaggedValue = {
88
- $type: 'FieldRef';
89
- value: {
90
- _ref: string;
91
- };
92
- };
93
-
94
62
  export declare type Fragment = {
95
63
  type: 'stringChunk';
96
64
  chunk: string;
@@ -126,19 +94,8 @@ export declare type JoinExpression = {
126
94
  isRelationUnique: boolean;
127
95
  };
128
96
 
129
- export declare type JsonInputTaggedValue = DateTaggedValue | DecimalTaggedValue | BytesTaggedValue | BigIntTaggedValue | FieldRefTaggedValue | JsonTaggedValue | EnumTaggedValue;
130
-
131
- export declare type JsonOutputTaggedValue = DateTaggedValue | DecimalTaggedValue | BytesTaggedValue | BigIntTaggedValue | JsonTaggedValue;
132
-
133
- export declare type JsonTaggedValue = {
134
- $type: 'Json';
135
- value: string;
136
- };
137
-
138
97
  export declare const noopTracingHelper: TracingHelper;
139
98
 
140
- export declare function normalizeJsonProtocolValues(result: unknown): unknown;
141
-
142
99
  export declare type Pagination = {
143
100
  cursor: Record<string, PrismaValue> | null;
144
101
  take: number | null;
package/dist/index.js CHANGED
@@ -42,7 +42,6 @@ __export(index_exports, {
42
42
  isPrismaValueGenerator: () => isPrismaValueGenerator,
43
43
  isPrismaValuePlaceholder: () => isPrismaValuePlaceholder,
44
44
  noopTracingHelper: () => noopTracingHelper,
45
- normalizeJsonProtocolValues: () => normalizeJsonProtocolValues,
46
45
  safeJsonStringify: () => safeJsonStringify
47
46
  });
48
47
  module.exports = __toCommonJS(index_exports);
@@ -1395,53 +1394,6 @@ function evalFieldOperation(op, value, scope, generators) {
1395
1394
  }
1396
1395
  }
1397
1396
 
1398
- // src/json-protocol.ts
1399
- var import_decimal3 = require("decimal.js");
1400
- function normalizeJsonProtocolValues(result) {
1401
- if (result === null) {
1402
- return result;
1403
- }
1404
- if (Array.isArray(result)) {
1405
- return result.map(normalizeJsonProtocolValues);
1406
- }
1407
- if (typeof result === "object") {
1408
- if (isTaggedValue(result)) {
1409
- return normalizeTaggedValue(result);
1410
- }
1411
- if (result.constructor !== null && result.constructor.name !== "Object") {
1412
- return result;
1413
- }
1414
- return mapObjectValues(result, normalizeJsonProtocolValues);
1415
- }
1416
- return result;
1417
- }
1418
- function isTaggedValue(value) {
1419
- return value !== null && typeof value == "object" && typeof value["$type"] === "string";
1420
- }
1421
- function normalizeTaggedValue({ $type, value }) {
1422
- switch ($type) {
1423
- case "BigInt":
1424
- return { $type, value: String(value) };
1425
- case "Bytes":
1426
- return { $type, value };
1427
- case "DateTime":
1428
- return { $type, value: new Date(value).toISOString() };
1429
- case "Decimal":
1430
- return { $type, value: String(new import_decimal3.Decimal(value)) };
1431
- case "Json":
1432
- return { $type, value: JSON.stringify(JSON.parse(value)) };
1433
- default:
1434
- assertNever(value, "Unknown tagged value");
1435
- }
1436
- }
1437
- function mapObjectValues(object, mapper) {
1438
- const result = {};
1439
- for (const key of Object.keys(object)) {
1440
- result[key] = mapper(object[key], key);
1441
- }
1442
- return result;
1443
- }
1444
-
1445
1397
  // src/transactionManager/TransactionManager.ts
1446
1398
  var import_debug = require("@prisma/debug");
1447
1399
 
@@ -1703,6 +1655,5 @@ var TransactionManager = class {
1703
1655
  isPrismaValueGenerator,
1704
1656
  isPrismaValuePlaceholder,
1705
1657
  noopTracingHelper,
1706
- normalizeJsonProtocolValues,
1707
1658
  safeJsonStringify
1708
1659
  });
package/dist/index.mjs CHANGED
@@ -1346,53 +1346,6 @@ function evalFieldOperation(op, value, scope, generators) {
1346
1346
  }
1347
1347
  }
1348
1348
 
1349
- // src/json-protocol.ts
1350
- import { Decimal as Decimal3 } from "decimal.js";
1351
- function normalizeJsonProtocolValues(result) {
1352
- if (result === null) {
1353
- return result;
1354
- }
1355
- if (Array.isArray(result)) {
1356
- return result.map(normalizeJsonProtocolValues);
1357
- }
1358
- if (typeof result === "object") {
1359
- if (isTaggedValue(result)) {
1360
- return normalizeTaggedValue(result);
1361
- }
1362
- if (result.constructor !== null && result.constructor.name !== "Object") {
1363
- return result;
1364
- }
1365
- return mapObjectValues(result, normalizeJsonProtocolValues);
1366
- }
1367
- return result;
1368
- }
1369
- function isTaggedValue(value) {
1370
- return value !== null && typeof value == "object" && typeof value["$type"] === "string";
1371
- }
1372
- function normalizeTaggedValue({ $type, value }) {
1373
- switch ($type) {
1374
- case "BigInt":
1375
- return { $type, value: String(value) };
1376
- case "Bytes":
1377
- return { $type, value };
1378
- case "DateTime":
1379
- return { $type, value: new Date(value).toISOString() };
1380
- case "Decimal":
1381
- return { $type, value: String(new Decimal3(value)) };
1382
- case "Json":
1383
- return { $type, value: JSON.stringify(JSON.parse(value)) };
1384
- default:
1385
- assertNever(value, "Unknown tagged value");
1386
- }
1387
- }
1388
- function mapObjectValues(object, mapper) {
1389
- const result = {};
1390
- for (const key of Object.keys(object)) {
1391
- result[key] = mapper(object[key], key);
1392
- }
1393
- return result;
1394
- }
1395
-
1396
1349
  // src/transactionManager/TransactionManager.ts
1397
1350
  import { Debug } from "@prisma/debug";
1398
1351
 
@@ -1653,6 +1606,5 @@ export {
1653
1606
  isPrismaValueGenerator,
1654
1607
  isPrismaValuePlaceholder,
1655
1608
  noopTracingHelper,
1656
- normalizeJsonProtocolValues,
1657
1609
  safeJsonStringify
1658
1610
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-engine-runtime",
3
- "version": "6.12.0-dev.22",
3
+ "version": "6.12.0-dev.23",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -31,8 +31,8 @@
31
31
  "nanoid": "5.1.5",
32
32
  "ulid": "3.0.0",
33
33
  "uuid": "11.1.0",
34
- "@prisma/driver-adapter-utils": "6.12.0-dev.22",
35
- "@prisma/debug": "6.12.0-dev.22"
34
+ "@prisma/debug": "6.12.0-dev.23",
35
+ "@prisma/driver-adapter-utils": "6.12.0-dev.23"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/jest": "29.5.14",
@@ -1,33 +0,0 @@
1
- export type DateTaggedValue = {
2
- $type: 'DateTime';
3
- value: string;
4
- };
5
- export type DecimalTaggedValue = {
6
- $type: 'Decimal';
7
- value: string;
8
- };
9
- export type BytesTaggedValue = {
10
- $type: 'Bytes';
11
- value: string;
12
- };
13
- export type BigIntTaggedValue = {
14
- $type: 'BigInt';
15
- value: string;
16
- };
17
- export type FieldRefTaggedValue = {
18
- $type: 'FieldRef';
19
- value: {
20
- _ref: string;
21
- };
22
- };
23
- export type EnumTaggedValue = {
24
- $type: 'Enum';
25
- value: string;
26
- };
27
- export type JsonTaggedValue = {
28
- $type: 'Json';
29
- value: string;
30
- };
31
- export type JsonInputTaggedValue = DateTaggedValue | DecimalTaggedValue | BytesTaggedValue | BigIntTaggedValue | FieldRefTaggedValue | JsonTaggedValue | EnumTaggedValue;
32
- export type JsonOutputTaggedValue = DateTaggedValue | DecimalTaggedValue | BytesTaggedValue | BigIntTaggedValue | JsonTaggedValue;
33
- export declare function normalizeJsonProtocolValues(result: unknown): unknown;