prisma-sql 1.75.5 → 1.75.6
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/generator.cjs +3 -3
- package/dist/generator.cjs.map +1 -1
- package/dist/generator.js +3 -3
- package/dist/generator.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/generator.js
CHANGED
|
@@ -2312,7 +2312,7 @@ var require_package = __commonJS({
|
|
|
2312
2312
|
"package.json"(exports$1, module) {
|
|
2313
2313
|
module.exports = {
|
|
2314
2314
|
name: "prisma-sql",
|
|
2315
|
-
version: "1.75.
|
|
2315
|
+
version: "1.75.6",
|
|
2316
2316
|
description: "Convert Prisma queries to optimized SQL with type safety. 2-7x faster than Prisma Client.",
|
|
2317
2317
|
main: "dist/index.cjs",
|
|
2318
2318
|
module: "dist/index.js",
|
|
@@ -7922,7 +7922,7 @@ function resolveRelationOrderByChain(relationFieldName, value, currentModel, cur
|
|
|
7922
7922
|
`Relation orderBy nesting too deep (max ${MAX_RELATION_ORDER_BY_DEPTH} levels)`
|
|
7923
7923
|
);
|
|
7924
7924
|
}
|
|
7925
|
-
if ("_count" in value) {
|
|
7925
|
+
if ("_count" in value && value._count !== void 0) {
|
|
7926
7926
|
throw new Error(
|
|
7927
7927
|
`Relation orderBy with _count on '${relationFieldName}' is not yet supported by prisma-sql`
|
|
7928
7928
|
);
|
|
@@ -7951,7 +7951,7 @@ function resolveRelationOrderByChain(relationFieldName, value, currentModel, cur
|
|
|
7951
7951
|
ctx.joins.push(`LEFT JOIN ${tableRef} ${joinAlias} ON ${cond}`);
|
|
7952
7952
|
const relScalarSet = getScalarFieldSet(relatedModel);
|
|
7953
7953
|
const relRelationSet = getRelationFieldSet(relatedModel);
|
|
7954
|
-
const nestedEntries = Object.entries(value);
|
|
7954
|
+
const nestedEntries = Object.entries(value).filter(([, v]) => v !== void 0);
|
|
7955
7955
|
const orderFragments = [];
|
|
7956
7956
|
for (const [nestedField, nestedValue] of nestedEntries) {
|
|
7957
7957
|
if (relScalarSet.has(nestedField)) {
|