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.cjs
CHANGED
|
@@ -2323,7 +2323,7 @@ var require_package = __commonJS({
|
|
|
2323
2323
|
"package.json"(exports$1, module) {
|
|
2324
2324
|
module.exports = {
|
|
2325
2325
|
name: "prisma-sql",
|
|
2326
|
-
version: "1.75.
|
|
2326
|
+
version: "1.75.6",
|
|
2327
2327
|
description: "Convert Prisma queries to optimized SQL with type safety. 2-7x faster than Prisma Client.",
|
|
2328
2328
|
main: "dist/index.cjs",
|
|
2329
2329
|
module: "dist/index.js",
|
|
@@ -7933,7 +7933,7 @@ function resolveRelationOrderByChain(relationFieldName, value, currentModel, cur
|
|
|
7933
7933
|
`Relation orderBy nesting too deep (max ${MAX_RELATION_ORDER_BY_DEPTH} levels)`
|
|
7934
7934
|
);
|
|
7935
7935
|
}
|
|
7936
|
-
if ("_count" in value) {
|
|
7936
|
+
if ("_count" in value && value._count !== void 0) {
|
|
7937
7937
|
throw new Error(
|
|
7938
7938
|
`Relation orderBy with _count on '${relationFieldName}' is not yet supported by prisma-sql`
|
|
7939
7939
|
);
|
|
@@ -7962,7 +7962,7 @@ function resolveRelationOrderByChain(relationFieldName, value, currentModel, cur
|
|
|
7962
7962
|
ctx.joins.push(`LEFT JOIN ${tableRef} ${joinAlias} ON ${cond}`);
|
|
7963
7963
|
const relScalarSet = getScalarFieldSet(relatedModel);
|
|
7964
7964
|
const relRelationSet = getRelationFieldSet(relatedModel);
|
|
7965
|
-
const nestedEntries = Object.entries(value);
|
|
7965
|
+
const nestedEntries = Object.entries(value).filter(([, v]) => v !== void 0);
|
|
7966
7966
|
const orderFragments = [];
|
|
7967
7967
|
for (const [nestedField, nestedValue] of nestedEntries) {
|
|
7968
7968
|
if (relScalarSet.has(nestedField)) {
|