Revert "feat: grouped query builder with $upIf/$downIf condition groups"

This reverts commit 99b59070a2.
This commit is contained in:
M1
2026-03-16 13:53:27 +04:00
parent 99b59070a2
commit 5328471229
4 changed files with 3 additions and 168 deletions
-7
View File
@@ -86,13 +86,6 @@ export function evaluate(query: unknown, ctx: EvalContext): boolean {
const q = query as Record<string, unknown>;
// $upIf / $downIf — named condition groups, $downIf takes precedence
if ("$upIf" in q || "$downIf" in q) {
if ("$downIf" in q && evaluate(q.$downIf, ctx)) return false;
if ("$upIf" in q) return evaluate(q.$upIf, ctx);
return true; // only $downIf set and it didn't match → up
}
// $and
if ("$and" in q) {
const clauses = q.$and;