Load IDs from model

This commit is contained in:
M66B
2019-07-28 10:09:00 +02:00
parent 98a99417ad
commit 55f5faf794
3 changed files with 44 additions and 38 deletions

View File

@@ -200,17 +200,6 @@ public interface DaoMessage {
" ORDER BY message.received DESC")
List<Long> getMessageIdsByFolder(Long folder);
@Query("SELECT message.id" +
" FROM message" +
" JOIN folder ON folder.id = message.folder" +
" WHERE ((:search AND ui_found)" +
" OR (NOT :search AND :folder IS NULL AND folder.unified)" +
" OR (NOT :search AND folder.id = :folder))" +
" AND ui_hide = 0" +
" AND (:snoozed OR ui_snoozed IS NULL)" +
" ORDER BY message.received DESC")
List<Long> getMessageIds(Long folder, boolean search, boolean snoozed);
@Query("SELECT id" +
" FROM message" +
" WHERE content" +