mirror of https://github.com/usememos/memos.git
fix: boolean filters
This commit is contained in:
parent
506b477d50
commit
312b27647a
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue