From 850064b871cb9d7f45cf5243119709bd76ee0765 Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Sun, 12 Dec 2021 14:52:55 -0600 Subject: [PATCH] fix: handle filters with no criteria --- src/db.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/db.rs b/src/db.rs index 415ec29..5e3959a 100644 --- a/src/db.rs +++ b/src/db.rs @@ -245,6 +245,9 @@ fn query_from_sub(sub: &Subscription) -> String { fc.push_str(&filter_components.join(" AND ")); fc.push_str(" )"); filter_clauses.push(fc); + } else { + // if there are no filter clauses, we should return everything + filter_clauses.push(" 1=1 ".to_owned()); } }