Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
fix: filter args of postgres
johnnyjoy2a92baf52c8f
diff --git a/store/db/postgres/memo_relation.go b/store/db/postgres/memo_relation.goindex 60aaf8762..f76440861 100644--- a/store/db/postgres/memo_relation.go+++ b/store/db/postgres/memo_relation.go@@ -56,6 +56,7 @@ func (d *DB) ListMemoRelations(ctx context.Context, find *store.FindMemoRelationreturn nil, err}convertCtx := filter.NewConvertContext()+ convertCtx.ArgsOffset = len(args)// ConvertExprToSQL converts the parsed expression to a SQL condition string.if err := d.ConvertExprToSQL(convertCtx, parsedExpr.GetExpr()); err != nil {return nil, err@@ -64,7 +65,7 @@ func (d *DB) ListMemoRelations(ctx context.Context, find *store.FindMemoRelationif condition != "" {where = append(where, fmt.Sprintf("memo_id IN (SELECT id FROM memo WHERE %s)", condition))where = append(where, fmt.Sprintf("related_memo_id IN (SELECT id FROM memo WHERE %s)", condition))- args = append(args, append(convertCtx.Args, convertCtx.Args...)...)+ args = append(args, convertCtx.Args...)}}