fix: boolean filters

This commit is contained in:
Colin 2025-08-04 22:51:18 -04:00
parent 506b477d50
commit 312b27647a
2 changed files with 1 additions and 3 deletions

View File

@ -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)

View File

@ -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]);