@prisma/client-engine-runtime 6.4.0-dev.36 → 6.4.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.
- package/dist/index.js +13 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -191,7 +191,19 @@ function placeholderTypeToArgType(type) {
|
|
|
191
191
|
function serialize(resultSet) {
|
|
192
192
|
return resultSet.rows.map(
|
|
193
193
|
(row) => row.reduce((acc, value, index) => {
|
|
194
|
-
|
|
194
|
+
const splitByDot = resultSet.columnNames[index].split(".");
|
|
195
|
+
let nested = acc;
|
|
196
|
+
for (let i = 0; i < splitByDot.length; i++) {
|
|
197
|
+
const key = splitByDot[i];
|
|
198
|
+
if (i === splitByDot.length - 1) {
|
|
199
|
+
nested[key] = value;
|
|
200
|
+
} else {
|
|
201
|
+
if (nested[key] === void 0) {
|
|
202
|
+
nested[key] = {};
|
|
203
|
+
}
|
|
204
|
+
nested = nested[key];
|
|
205
|
+
}
|
|
206
|
+
}
|
|
195
207
|
return acc;
|
|
196
208
|
}, {})
|
|
197
209
|
);
|