@prisma/client-engine-runtime 6.9.0-dev.13 → 6.9.0-dev.15
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 +6 -1
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +10 -4
- package/dist/index.mjs +9 -4
- 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
|
} | {
|
package/dist/index.d.mts
CHANGED
|
@@ -41,6 +41,8 @@ export declare type Fragment = {
|
|
|
41
41
|
*/
|
|
42
42
|
export declare function isDeepStrictEqual(a: unknown, b: unknown): boolean;
|
|
43
43
|
|
|
44
|
+
export declare function isPrismaValueBigInt(value: unknown): value is PrismaValueBigInt;
|
|
45
|
+
|
|
44
46
|
export declare function isPrismaValueBytes(value: unknown): value is PrismaValueBytes;
|
|
45
47
|
|
|
46
48
|
export declare function isPrismaValueGenerator(value: unknown): value is PrismaValueGenerator;
|
|
@@ -68,7 +70,12 @@ export declare interface PlaceholderFormat {
|
|
|
68
70
|
hasNumbering: boolean;
|
|
69
71
|
}
|
|
70
72
|
|
|
71
|
-
export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes;
|
|
73
|
+
export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes | PrismaValueBigInt;
|
|
74
|
+
|
|
75
|
+
export declare type PrismaValueBigInt = {
|
|
76
|
+
prisma__type: 'bigint';
|
|
77
|
+
prisma__value: string;
|
|
78
|
+
};
|
|
72
79
|
|
|
73
80
|
export declare type PrismaValueBytes = {
|
|
74
81
|
prisma__type: 'bytes';
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export declare type Fragment = {
|
|
|
41
41
|
*/
|
|
42
42
|
export declare function isDeepStrictEqual(a: unknown, b: unknown): boolean;
|
|
43
43
|
|
|
44
|
+
export declare function isPrismaValueBigInt(value: unknown): value is PrismaValueBigInt;
|
|
45
|
+
|
|
44
46
|
export declare function isPrismaValueBytes(value: unknown): value is PrismaValueBytes;
|
|
45
47
|
|
|
46
48
|
export declare function isPrismaValueGenerator(value: unknown): value is PrismaValueGenerator;
|
|
@@ -68,7 +70,12 @@ export declare interface PlaceholderFormat {
|
|
|
68
70
|
hasNumbering: boolean;
|
|
69
71
|
}
|
|
70
72
|
|
|
71
|
-
export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes;
|
|
73
|
+
export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator | PrismaValueBytes | PrismaValueBigInt;
|
|
74
|
+
|
|
75
|
+
export declare type PrismaValueBigInt = {
|
|
76
|
+
prisma__type: 'bigint';
|
|
77
|
+
prisma__value: string;
|
|
78
|
+
};
|
|
72
79
|
|
|
73
80
|
export declare type PrismaValueBytes = {
|
|
74
81
|
prisma__type: 'bytes';
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ __export(index_exports, {
|
|
|
36
36
|
TransactionManagerError: () => TransactionManagerError,
|
|
37
37
|
UserFacingError: () => UserFacingError,
|
|
38
38
|
isDeepStrictEqual: () => isDeepStrictEqual,
|
|
39
|
+
isPrismaValueBigInt: () => isPrismaValueBigInt,
|
|
39
40
|
isPrismaValueBytes: () => isPrismaValueBytes,
|
|
40
41
|
isPrismaValueGenerator: () => isPrismaValueGenerator,
|
|
41
42
|
isPrismaValuePlaceholder: () => isPrismaValuePlaceholder,
|
|
@@ -431,6 +432,9 @@ function isPrismaValueGenerator(value) {
|
|
|
431
432
|
function isPrismaValueBytes(value) {
|
|
432
433
|
return typeof value === "object" && value !== null && value["prisma__type"] === "bytes";
|
|
433
434
|
}
|
|
435
|
+
function isPrismaValueBigInt(value) {
|
|
436
|
+
return typeof value === "object" && value !== null && value["prisma__type"] === "bigint";
|
|
437
|
+
}
|
|
434
438
|
|
|
435
439
|
// src/interpreter/renderQuery.ts
|
|
436
440
|
function renderQuery(dbQuery, scope, generators) {
|
|
@@ -473,9 +477,10 @@ function evaluateParam(param, scope, generators) {
|
|
|
473
477
|
}
|
|
474
478
|
if (Array.isArray(value)) {
|
|
475
479
|
value = value.map((el) => evaluateParam(el, scope, generators));
|
|
476
|
-
}
|
|
477
|
-
if (isPrismaValueBytes(value)) {
|
|
480
|
+
} else if (isPrismaValueBytes(value)) {
|
|
478
481
|
value = Buffer.from(value.prisma__value, "base64");
|
|
482
|
+
} else if (isPrismaValueBigInt(value)) {
|
|
483
|
+
value = BigInt(value.prisma__value);
|
|
479
484
|
}
|
|
480
485
|
return value;
|
|
481
486
|
}
|
|
@@ -714,11 +719,11 @@ var QueryInterpreter = class _QueryInterpreter {
|
|
|
714
719
|
}
|
|
715
720
|
case "concat": {
|
|
716
721
|
const parts = await Promise.all(node.args.map((arg) => this.interpretNode(arg, queryable, scope, generators)));
|
|
717
|
-
return parts.reduce((acc, part) => acc.concat(asList(part)), []);
|
|
722
|
+
return parts.length > 0 ? parts.reduce((acc, part) => acc.concat(asList(part)), []) : [];
|
|
718
723
|
}
|
|
719
724
|
case "sum": {
|
|
720
725
|
const parts = await Promise.all(node.args.map((arg) => this.interpretNode(arg, queryable, scope, generators)));
|
|
721
|
-
return parts.reduce((acc, part) => asNumber(acc) + asNumber(part));
|
|
726
|
+
return parts.length > 0 ? parts.reduce((acc, part) => asNumber(acc) + asNumber(part)) : 0;
|
|
722
727
|
}
|
|
723
728
|
case "execute": {
|
|
724
729
|
const query = renderQuery(node.args, scope, generators);
|
|
@@ -1185,6 +1190,7 @@ var TransactionManager = class {
|
|
|
1185
1190
|
TransactionManagerError,
|
|
1186
1191
|
UserFacingError,
|
|
1187
1192
|
isDeepStrictEqual,
|
|
1193
|
+
isPrismaValueBigInt,
|
|
1188
1194
|
isPrismaValueBytes,
|
|
1189
1195
|
isPrismaValueGenerator,
|
|
1190
1196
|
isPrismaValuePlaceholder,
|
package/dist/index.mjs
CHANGED
|
@@ -386,6 +386,9 @@ function isPrismaValueGenerator(value) {
|
|
|
386
386
|
function isPrismaValueBytes(value) {
|
|
387
387
|
return typeof value === "object" && value !== null && value["prisma__type"] === "bytes";
|
|
388
388
|
}
|
|
389
|
+
function isPrismaValueBigInt(value) {
|
|
390
|
+
return typeof value === "object" && value !== null && value["prisma__type"] === "bigint";
|
|
391
|
+
}
|
|
389
392
|
|
|
390
393
|
// src/interpreter/renderQuery.ts
|
|
391
394
|
function renderQuery(dbQuery, scope, generators) {
|
|
@@ -428,9 +431,10 @@ function evaluateParam(param, scope, generators) {
|
|
|
428
431
|
}
|
|
429
432
|
if (Array.isArray(value)) {
|
|
430
433
|
value = value.map((el) => evaluateParam(el, scope, generators));
|
|
431
|
-
}
|
|
432
|
-
if (isPrismaValueBytes(value)) {
|
|
434
|
+
} else if (isPrismaValueBytes(value)) {
|
|
433
435
|
value = Buffer.from(value.prisma__value, "base64");
|
|
436
|
+
} else if (isPrismaValueBigInt(value)) {
|
|
437
|
+
value = BigInt(value.prisma__value);
|
|
434
438
|
}
|
|
435
439
|
return value;
|
|
436
440
|
}
|
|
@@ -669,11 +673,11 @@ var QueryInterpreter = class _QueryInterpreter {
|
|
|
669
673
|
}
|
|
670
674
|
case "concat": {
|
|
671
675
|
const parts = await Promise.all(node.args.map((arg) => this.interpretNode(arg, queryable, scope, generators)));
|
|
672
|
-
return parts.reduce((acc, part) => acc.concat(asList(part)), []);
|
|
676
|
+
return parts.length > 0 ? parts.reduce((acc, part) => acc.concat(asList(part)), []) : [];
|
|
673
677
|
}
|
|
674
678
|
case "sum": {
|
|
675
679
|
const parts = await Promise.all(node.args.map((arg) => this.interpretNode(arg, queryable, scope, generators)));
|
|
676
|
-
return parts.reduce((acc, part) => asNumber(acc) + asNumber(part));
|
|
680
|
+
return parts.length > 0 ? parts.reduce((acc, part) => asNumber(acc) + asNumber(part)) : 0;
|
|
677
681
|
}
|
|
678
682
|
case "execute": {
|
|
679
683
|
const query = renderQuery(node.args, scope, generators);
|
|
@@ -1139,6 +1143,7 @@ export {
|
|
|
1139
1143
|
TransactionManagerError,
|
|
1140
1144
|
UserFacingError,
|
|
1141
1145
|
isDeepStrictEqual,
|
|
1146
|
+
isPrismaValueBigInt,
|
|
1142
1147
|
isPrismaValueBytes,
|
|
1143
1148
|
isPrismaValueGenerator,
|
|
1144
1149
|
isPrismaValuePlaceholder,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "6.9.0-dev.
|
|
3
|
+
"version": "6.9.0-dev.15",
|
|
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/debug": "6.9.0-dev.
|
|
35
|
-
"@prisma/driver-adapter-utils": "6.9.0-dev.
|
|
34
|
+
"@prisma/debug": "6.9.0-dev.15",
|
|
35
|
+
"@prisma/driver-adapter-utils": "6.9.0-dev.15"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "29.5.14",
|