From 312b27647af3b5388cecfff13084e4f731da3567 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 4 Aug 2025 22:51:18 -0400 Subject: [PATCH] fix: boolean filters --- plugin/filter/dialect.go | 3 +-- web/src/pages/Home.tsx | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/plugin/filter/dialect.go b/plugin/filter/dialect.go index 41adc2ffe..eac3c70ee 100644 --- a/plugin/filter/dialect.go +++ b/plugin/filter/dialect.go @@ -205,9 +205,8 @@ func (d *PostgreSQLDialect) GetBooleanComparison(path string, _ bool) string { func (d *PostgreSQLDialect) GetBooleanCheck(path string) string { // Special handling for standalone boolean identifiers if strings.Contains(path, "hasLink") || strings.Contains(path, "hasCode") || strings.Contains(path, "hasIncompleteTasks") { - // Use memo-> instead of memo.payload-> for these fields parts := strings.Split(strings.TrimPrefix(path, "$."), ".") - result := fmt.Sprintf("%s->'payload'", d.GetTablePrefix()) + result := fmt.Sprintf("%s.payload", d.GetTablePrefix()) for i, part := range parts { if i == len(parts)-1 { result += fmt.Sprintf("->>'%s'", part) diff --git a/web/src/pages/Home.tsx b/web/src/pages/Home.tsx index 398255ae9..49d0b792f 100644 --- a/web/src/pages/Home.tsx +++ b/web/src/pages/Home.tsx @@ -50,7 +50,6 @@ const Home = observer(() => { conditions.push(`${factor} >= ${timestampAfter} && ${factor} < ${timestampAfter + 60 * 60 * 24}`); } } - console.log("conditions", conditions); return conditions.length > 0 ? conditions.join(" && ") : undefined; }, [memoFilterStore.filters, selectedShortcut?.filter]);