@rebasepro/server-mongo 0.29.0-canary.g0e3a0e7 → 0.29.1

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/index.es.js CHANGED
@@ -77,6 +77,8 @@ var REBASE_TO_MONGO_OP = {
77
77
  ">": "$gt",
78
78
  "array-contains": "$elemMatch",
79
79
  "array-contains-any": "$in",
80
+ "array-contains-all": "$all",
81
+ "array-contained-by": "$not",
80
82
  "in": "$in",
81
83
  "not-in": "$nin"
82
84
  };
@@ -178,6 +180,10 @@ var MongoConditionBuilder = class MongoConditionBuilder {
178
180
  });
179
181
  }
180
182
  if (op === "array-contains") return { [field]: { $elemMatch: { $eq: value } } };
183
+ if (op === "array-contained-by") return { [field]: {
184
+ $type: "array",
185
+ $not: { $elemMatch: { $nin: Array.isArray(value) ? value : [value] } }
186
+ } };
181
187
  return { [field]: { [mongoOp]: value } };
182
188
  }
183
189
  /**