@dcupl/common 2.0.0-beta.10 → 2.0.0-beta.11
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/esm/index.js
CHANGED
|
@@ -2371,6 +2371,15 @@ class xe {
|
|
|
2371
2371
|
reset(e) {
|
|
2372
2372
|
e ? (this.indexMap.delete(e), this.dataMap.delete(e), this.indexMetadata.delete(e)) : (this.indexMap.clear(), this.dataMap.clear(), this.indexMetadata.clear());
|
|
2373
2373
|
}
|
|
2374
|
+
/**
|
|
2375
|
+
* Removes every index the predicate selects. Used to drop indices that
|
|
2376
|
+
* were built from now-stale data; the next read lazily rebuilds them via
|
|
2377
|
+
* {@link getOrCreateIndex}.
|
|
2378
|
+
*/
|
|
2379
|
+
resetIndicesWhere(e) {
|
|
2380
|
+
for (const t of Array.from(this.indexMap.keys()))
|
|
2381
|
+
e(t) && this.reset(t);
|
|
2382
|
+
}
|
|
2374
2383
|
fillDataMap(e, t) {
|
|
2375
2384
|
let r = this.dataMap.get(e);
|
|
2376
2385
|
r || (r = /* @__PURE__ */ new Map(), this.dataMap.set(e, r));
|
|
@@ -3071,8 +3080,10 @@ class it {
|
|
|
3071
3080
|
return o;
|
|
3072
3081
|
}
|
|
3073
3082
|
queryData(e, t, r, s) {
|
|
3083
|
+
if (t.queries.length === 0)
|
|
3084
|
+
return e;
|
|
3074
3085
|
const i = new Map(e);
|
|
3075
|
-
return t.
|
|
3086
|
+
return t.groupKey || (t.groupKey = "root"), t.groupType || (t.groupType = "and"), t.queries || (t.queries = []), this.validateQuery(t), this.evaluateQueryGroup(t, t, i, r, s);
|
|
3076
3087
|
}
|
|
3077
3088
|
// public getRelevantQueryData(data: any, options: DcuplGlobalQueryOptions<any>, model: DcuplModel<ListItem>) {
|
|
3078
3089
|
// // detect if any of the query attributes are a deep query.
|