Revert "feat: grouped query builder with $upIf/$downIf condition groups"
This reverts commit 99b59070a2.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user