@bedrockio/model 0.1.13 → 0.1.14
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/cjs/search.js +5 -1
- package/package.json +1 -1
- package/src/search.js +5 -1
package/dist/cjs/search.js
CHANGED
|
@@ -263,7 +263,11 @@ function isRangeQuery(schema, key, value) {
|
|
|
263
263
|
function mapOperatorQuery(obj) {
|
|
264
264
|
const query = {};
|
|
265
265
|
for (let [key, val] of Object.entries(obj)) {
|
|
266
|
-
|
|
266
|
+
if (isMongoOperator(key)) {
|
|
267
|
+
query[key] = val;
|
|
268
|
+
} else {
|
|
269
|
+
query[`$${key}`] = val;
|
|
270
|
+
}
|
|
267
271
|
}
|
|
268
272
|
return query;
|
|
269
273
|
}
|
package/package.json
CHANGED
package/src/search.js
CHANGED
|
@@ -276,7 +276,11 @@ function isRangeQuery(schema, key, value) {
|
|
|
276
276
|
function mapOperatorQuery(obj) {
|
|
277
277
|
const query = {};
|
|
278
278
|
for (let [key, val] of Object.entries(obj)) {
|
|
279
|
-
|
|
279
|
+
if (isMongoOperator(key)) {
|
|
280
|
+
query[key] = val;
|
|
281
|
+
} else {
|
|
282
|
+
query[`$${key}`] = val;
|
|
283
|
+
}
|
|
280
284
|
}
|
|
281
285
|
return query;
|
|
282
286
|
}
|