@prisma/client-engine-runtime 6.11.0-integration-fix-generator-ts-pre-preview.1 → 6.11.0
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 +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +3 -3
package/dist/QueryPlan.d.ts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -140,12 +140,12 @@ function mapObject(data, fields, enums) {
|
|
|
140
140
|
throw new DataMapperError(`Unexpected 'AffectedRows' node in data mapping for field '${name}'`);
|
|
141
141
|
}
|
|
142
142
|
case "Object": {
|
|
143
|
-
if (
|
|
143
|
+
if (node.serializedName !== null && !Object.hasOwn(data, node.serializedName)) {
|
|
144
144
|
throw new DataMapperError(
|
|
145
145
|
`Missing data field (Object): '${name}'; node: ${JSON.stringify(node)}; data: ${JSON.stringify(data)}`
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
|
-
const target = node.
|
|
148
|
+
const target = node.serializedName !== null ? data[node.serializedName] : data;
|
|
149
149
|
result[name] = mapArrayOrObject(target, node.fields, enums);
|
|
150
150
|
break;
|
|
151
151
|
}
|
|
@@ -477,7 +477,7 @@ function renderErrorMessage(err) {
|
|
|
477
477
|
case "NullConstraintViolation":
|
|
478
478
|
return `Null constraint violation on the ${renderConstraint(err.cause.constraint)}`;
|
|
479
479
|
case "ValueOutOfRange":
|
|
480
|
-
return `Value out of range for the type
|
|
480
|
+
return `Value out of range for the type: ${err.cause.cause}`;
|
|
481
481
|
case "TableDoesNotExist": {
|
|
482
482
|
const table = err.cause.table ?? "(not available)";
|
|
483
483
|
return `The table \`${table}\` does not exist in the current database.`;
|
|
@@ -804,6 +804,8 @@ function serializeRawSql(resultSet) {
|
|
|
804
804
|
const types = resultSet.columnTypes.map((type) => serializeColumnType(type));
|
|
805
805
|
const mappers = types.map((type) => {
|
|
806
806
|
switch (type) {
|
|
807
|
+
case "bytes":
|
|
808
|
+
return (value) => Array.isArray(value) ? new Uint8Array(value) : value;
|
|
807
809
|
case "int":
|
|
808
810
|
return (value) => value === null ? null : typeof value === "number" ? value : parseInt(`${value}`, 10);
|
|
809
811
|
case "bigint":
|
package/dist/index.mjs
CHANGED
|
@@ -92,12 +92,12 @@ function mapObject(data, fields, enums) {
|
|
|
92
92
|
throw new DataMapperError(`Unexpected 'AffectedRows' node in data mapping for field '${name}'`);
|
|
93
93
|
}
|
|
94
94
|
case "Object": {
|
|
95
|
-
if (
|
|
95
|
+
if (node.serializedName !== null && !Object.hasOwn(data, node.serializedName)) {
|
|
96
96
|
throw new DataMapperError(
|
|
97
97
|
`Missing data field (Object): '${name}'; node: ${JSON.stringify(node)}; data: ${JSON.stringify(data)}`
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
|
-
const target = node.
|
|
100
|
+
const target = node.serializedName !== null ? data[node.serializedName] : data;
|
|
101
101
|
result[name] = mapArrayOrObject(target, node.fields, enums);
|
|
102
102
|
break;
|
|
103
103
|
}
|
|
@@ -429,7 +429,7 @@ function renderErrorMessage(err) {
|
|
|
429
429
|
case "NullConstraintViolation":
|
|
430
430
|
return `Null constraint violation on the ${renderConstraint(err.cause.constraint)}`;
|
|
431
431
|
case "ValueOutOfRange":
|
|
432
|
-
return `Value out of range for the type
|
|
432
|
+
return `Value out of range for the type: ${err.cause.cause}`;
|
|
433
433
|
case "TableDoesNotExist": {
|
|
434
434
|
const table = err.cause.table ?? "(not available)";
|
|
435
435
|
return `The table \`${table}\` does not exist in the current database.`;
|
|
@@ -756,6 +756,8 @@ function serializeRawSql(resultSet) {
|
|
|
756
756
|
const types = resultSet.columnTypes.map((type) => serializeColumnType(type));
|
|
757
757
|
const mappers = types.map((type) => {
|
|
758
758
|
switch (type) {
|
|
759
|
+
case "bytes":
|
|
760
|
+
return (value) => Array.isArray(value) ? new Uint8Array(value) : value;
|
|
759
761
|
case "int":
|
|
760
762
|
return (value) => value === null ? null : typeof value === "number" ? value : parseInt(`${value}`, 10);
|
|
761
763
|
case "bigint":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "6.11.0
|
|
3
|
+
"version": "6.11.0",
|
|
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/
|
|
35
|
-
"@prisma/
|
|
34
|
+
"@prisma/driver-adapter-utils": "6.11.0",
|
|
35
|
+
"@prisma/debug": "6.11.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "29.5.14",
|