Category as view

This commit is contained in:
M66B
2024-08-02 09:13:47 +02:00
parent 88275d18f4
commit 792e020d0a
8 changed files with 117 additions and 57 deletions

View File

@@ -79,6 +79,7 @@ public interface DaoMessage {
" LEFT JOIN identity_view AS identity ON identity.id = message.identity" +
" JOIN folder_view AS folder ON folder.id = message.folder" +
" WHERE account.`synchronize`" +
" AND (:category IS NULL OR account.category = :category)" +
" AND (:threading OR (:type IS NULL AND (folder.unified OR :found)) OR (:type IS NOT NULL AND folder.type = :type))" +
" AND (NOT message.ui_hide OR :debug)" +
" AND (NOT :found OR message.ui_found = :found)" +
@@ -114,7 +115,7 @@ public interface DaoMessage {
" END" +
", CASE WHEN :ascending THEN message.received ELSE -message.received END")
DataSource.Factory<Integer, TupleMessageEx> pagedUnified(
String type,
String type, String category,
boolean threading, boolean group_category,
String sort1, String sort2, boolean ascending,
boolean filter_seen, boolean filter_unflagged, boolean filter_unknown, boolean filter_snoozed, boolean filter_deleted, String filter_language,
@@ -1113,6 +1114,7 @@ public interface DaoMessage {
" LEFT JOIN identity_view AS identity ON identity.id = message.identity" +
" JOIN folder_view AS folder ON folder.id = message.folder" +
" WHERE account.`synchronize`" +
" AND (:category IS NULL OR account.category = :category)" +
" AND (:threading OR (:type IS NULL AND (folder.unified OR :found)) OR (:type IS NOT NULL AND folder.type = :type))" +
" AND (NOT message.ui_hide OR :debug)" +
" AND (NOT :found OR message.ui_found = :found)" +
@@ -1148,7 +1150,7 @@ public interface DaoMessage {
" END" +
", CASE WHEN :ascending THEN message.received ELSE -message.received END")
DataSource.Factory<Integer, TupleMessageEx> pagedUnifiedLegacy(
String type,
String type, String category,
boolean threading, boolean group_category,
String sort1, String sort2, boolean ascending,
boolean filter_seen, boolean filter_unflagged, boolean filter_unknown, boolean filter_snoozed, boolean filter_deleted, String filter_language,