@prisma/orm-family-sql 8.0.0-rc.1 → 8.0.0-rc.1-dev.2
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/orm-client.mjs +2 -1
- package/dist/orm-client.mjs.map +1 -1
- package/package.json +18 -18
package/dist/orm-client.mjs
CHANGED
|
@@ -1166,7 +1166,8 @@ function createTableRefRemapper(fromTable, toTable) {
|
|
|
1166
1166
|
function buildStateWhere(contract, tableName, state, options) {
|
|
1167
1167
|
const filterTableName = options?.filterTableName;
|
|
1168
1168
|
const cursorWhere = buildCursorWhere(filterTableName ?? tableName, state.orderBy, state.cursor);
|
|
1169
|
-
const
|
|
1169
|
+
const boundFilters = state.filters.map((filter) => bindWhereExpr(contract, filter, options?.namespaceId));
|
|
1170
|
+
const remappedFilters = filterTableName && filterTableName !== tableName ? boundFilters.map((filter) => filter.rewrite(createTableRefRemapper(filterTableName, tableName))) : boundFilters;
|
|
1170
1171
|
const boundCursorWhere = cursorWhere ? bindWhereExpr(contract, cursorWhere, options?.namespaceId) : void 0;
|
|
1171
1172
|
const remappedCursorWhere = boundCursorWhere && filterTableName && filterTableName !== tableName ? boundCursorWhere.rewrite(createTableRefRemapper(filterTableName, tableName)) : boundCursorWhere;
|
|
1172
1173
|
return combineWhereExprs(remappedCursorWhere ? [...remappedFilters, remappedCursorWhere] : remappedFilters);
|