Added upper limit to thread search

This commit is contained in:
M66B
2022-03-09 19:59:29 +01:00
parent fba2ab9870
commit 24edf5f9d5
2 changed files with 7 additions and 5 deletions

View File

@@ -425,8 +425,9 @@ public interface DaoMessage {
@Query("SELECT thread, msgid, hash, inreplyto FROM message" +
" WHERE account = :account" +
" AND (msgid IN (:msgids) OR inreplyto IN (:msgids))" +
" AND (:range IS NULL || received > :range)")
List<TupleThreadInfo> getThreadInfo(long account, List<String> msgids, Long range);
" AND (:from IS NULL || received > :from)" +
" AND (:to IS NULL || received < :to)")
List<TupleThreadInfo> getThreadInfo(long account, List<String> msgids, Long from, Long to);
@Query("SELECT * FROM message" +
" WHERE account = :account" +