This commit is contained in:
2026-01-05 13:40:23 +01:00
parent 18e29fa413
commit 8bcb35a8f0
7 changed files with 15 additions and 4 deletions
@@ -1,3 +1,4 @@
import { isUndefined } from "lodash";
import {
ServerQueryParam,
ServerQueryParamOrder,
@@ -43,7 +44,7 @@ export default function sqlGenerator<
field,
}: {
queryObj: ServerQueryQueryObject[string];
join?: ServerQueryParamsJoin[];
join?: (ServerQueryParamsJoin | undefined)[];
field?: string;
}) {
const finalFieldName = (() => {
@@ -247,6 +248,7 @@ export default function sqlGenerator<
str +=
"," +
genObject.join
.filter((j) => !isUndefined(j))
.map((joinObj) => {
const joinTableName = joinObj.alias
? joinObj.alias
@@ -294,6 +296,7 @@ export default function sqlGenerator<
str +=
" " +
genObject.join
.filter((j) => !isUndefined(j))
.map((join) => {
return (
join.joinType +