|
|
@ -113,8 +113,11 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
|
|
|
|
if err := d.ConvertExprToSQL(convertCtx, parsedExpr.GetExpr()); err != nil {
|
|
|
|
if err := d.ConvertExprToSQL(convertCtx, parsedExpr.GetExpr()); err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
where = append(where, fmt.Sprintf("(%s)", convertCtx.Buffer.String()))
|
|
|
|
condition := convertCtx.Buffer.String()
|
|
|
|
args = append(args, convertCtx.Args...)
|
|
|
|
if condition != "" {
|
|
|
|
|
|
|
|
where = append(where, fmt.Sprintf("(%s)", condition))
|
|
|
|
|
|
|
|
args = append(args, convertCtx.Args...)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if find.ExcludeComments {
|
|
|
|
if find.ExcludeComments {
|
|
|
|
where = append(where, "memo_relation.related_memo_id IS NULL")
|
|
|
|
where = append(where, "memo_relation.related_memo_id IS NULL")
|
|
|
|