This commit is contained in:
2026-01-05 14:11:17 +01:00
parent 58984214fc
commit 9402c859f7
5 changed files with 23 additions and 5 deletions
@@ -349,7 +349,7 @@ export default function sqlGenerator<
return genSqlSrchStr({
queryObj: newSubQueryObj,
field: _field,
field: newSubQueryObj.fieldName || _field,
join: genObject?.join,
});
});
@@ -361,7 +361,11 @@ export default function sqlGenerator<
);
}
return genSqlSrchStr({ queryObj, field, join: genObject?.join });
return genSqlSrchStr({
queryObj,
field: queryObj.fieldName || field,
join: genObject?.join,
});
});
const cleanedUpSearchStr = sqlSearhString?.filter(
+5
View File
@@ -1108,6 +1108,11 @@ export type ServerQueryObject<
operator?: (typeof ServerQueryOperators)[number];
equality?: (typeof ServerQueryEqualities)[number];
tableName?: K;
/**
* This will replace the top level field name if
* provided
*/
fieldName?: string;
__query?: {
[key in keyof T]: Omit<ServerQueryObject<T>, "__query">;
};