Optimized thread ID

This commit is contained in:
M66B
2022-01-08 11:33:20 +01:00
parent 67eb2e6ef3
commit 9f8626688c
3 changed files with 134 additions and 1 deletions

View File

@@ -425,6 +425,11 @@ public interface DaoMessage {
" AND inreplyto = :inreplyto")
List<EntityMessage> getMessagesByInReplyTo(long account, String inreplyto);
@Query("SELECT thread, msgid, hash, inreplyto FROM message" +
" WHERE account = :account" +
" AND (msgid IN (:msgids) OR inreplyto IN (:msgids))")
List<TupleThreadInfo> getThreadInfo(long account, List<String> msgids);
@Query("SELECT * FROM message" +
" WHERE account = :account" +
" AND sender = :sender" +