prisma-guard 1.18.0 → 1.19.0
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/runtime/index.js
CHANGED
|
@@ -1089,7 +1089,7 @@ function collectEqualityFields(where, model, typeMap) {
|
|
|
1089
1089
|
continue;
|
|
1090
1090
|
if (!value || !isPlainObject(value))
|
|
1091
1091
|
continue;
|
|
1092
|
-
if (
|
|
1092
|
+
if ("equals" in value) {
|
|
1093
1093
|
fields.add(key);
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
@@ -1420,6 +1420,13 @@ function createWhereBuilder(typeMap, enumMap, scalarBase) {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
}
|
|
1422
1422
|
function processScalarField(fieldName, operators, model, fieldMeta, fieldSchemas, scalarConditions) {
|
|
1423
|
+
if (operators === true) {
|
|
1424
|
+
const supportedOps = getSupportedOperators(fieldMeta);
|
|
1425
|
+
const expanded = {};
|
|
1426
|
+
for (const op of supportedOps)
|
|
1427
|
+
expanded[op] = true;
|
|
1428
|
+
operators = expanded;
|
|
1429
|
+
}
|
|
1423
1430
|
if (!isPlainObject(operators)) {
|
|
1424
1431
|
throw new ShapeError(
|
|
1425
1432
|
`Where config for scalar field "${fieldName}" on model "${model}" must be an object of operators`
|