|
|
@ -36,7 +36,7 @@ public interface DaoMessage {
|
|
|
|
// https://www.sqlite.org/lang_select.html
|
|
|
|
// https://www.sqlite.org/lang_select.html
|
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT message.*" +
|
|
|
|
@Query("SELECT message.*" +
|
|
|
|
", account.name AS accountName, IFNULL(identity.color,account.color) AS accountColor" +
|
|
|
|
", account.name AS accountName, IFNULL(identity.color, account.color) AS accountColor" +
|
|
|
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
|
|
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
|
|
|
", COUNT(message.id) AS count" +
|
|
|
|
", COUNT(message.id) AS count" +
|
|
|
|
", SUM(CASE WHEN message.ui_seen" +
|
|
|
|
", SUM(CASE WHEN message.ui_seen" +
|
|
|
@ -66,7 +66,7 @@ public interface DaoMessage {
|
|
|
|
DataSource.Factory<Integer, TupleMessageEx> pagedUnifiedInbox(String sort, boolean debug);
|
|
|
|
DataSource.Factory<Integer, TupleMessageEx> pagedUnifiedInbox(String sort, boolean debug);
|
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT message.*" +
|
|
|
|
@Query("SELECT message.*" +
|
|
|
|
", account.name AS accountName, IFNULL(identity.color,account.color) AS accountColor" +
|
|
|
|
", account.name AS accountName, identity.color AS accountColor" +
|
|
|
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
|
|
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
|
|
|
", COUNT(message.id) AS count" +
|
|
|
|
", COUNT(message.id) AS count" +
|
|
|
|
", SUM(CASE WHEN message.ui_seen" +
|
|
|
|
", SUM(CASE WHEN message.ui_seen" +
|
|
|
@ -97,7 +97,7 @@ public interface DaoMessage {
|
|
|
|
DataSource.Factory<Integer, TupleMessageEx> pagedFolder(long folder, String sort, boolean found, boolean debug);
|
|
|
|
DataSource.Factory<Integer, TupleMessageEx> pagedFolder(long folder, String sort, boolean found, boolean debug);
|
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT message.*" +
|
|
|
|
@Query("SELECT message.*" +
|
|
|
|
", account.name AS accountName, IFNULL(identity.color,account.color) AS accountColor" +
|
|
|
|
", account.name AS accountName, identity.color AS accountColor" +
|
|
|
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
|
|
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
|
|
|
", (SELECT COUNT(m1.id) FROM message m1 WHERE m1.account = message.account AND m1.thread = message.thread AND NOT m1.ui_hide) AS count" +
|
|
|
|
", (SELECT COUNT(m1.id) FROM message m1 WHERE m1.account = message.account AND m1.thread = message.thread AND NOT m1.ui_hide) AS count" +
|
|
|
|
", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" +
|
|
|
|
", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" +
|
|
|
@ -168,7 +168,7 @@ public interface DaoMessage {
|
|
|
|
List<Long> getMessageWithoutPreview();
|
|
|
|
List<Long> getMessageWithoutPreview();
|
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT message.*" +
|
|
|
|
@Query("SELECT message.*" +
|
|
|
|
", account.name AS accountName, IFNULL(identity.color,account.color) AS accountColor" +
|
|
|
|
", account.name AS accountName, identity.color AS accountColor" +
|
|
|
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
|
|
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
|
|
|
", (SELECT COUNT(m1.id) FROM message m1 WHERE m1.account = message.account AND m1.thread = message.thread AND NOT m1.ui_hide) AS count" +
|
|
|
|
", (SELECT COUNT(m1.id) FROM message m1 WHERE m1.account = message.account AND m1.thread = message.thread AND NOT m1.ui_hide) AS count" +
|
|
|
|
", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" +
|
|
|
|
", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" +
|
|
|
@ -182,7 +182,7 @@ public interface DaoMessage {
|
|
|
|
LiveData<TupleMessageEx> liveMessage(long id);
|
|
|
|
LiveData<TupleMessageEx> liveMessage(long id);
|
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT message.*" +
|
|
|
|
@Query("SELECT message.*" +
|
|
|
|
", account.name AS accountName, IFNULL(identity.color,account.color) AS accountColor" +
|
|
|
|
", account.name AS accountName, IFNULL(identity.color, account.color) AS accountColor" +
|
|
|
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
|
|
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
|
|
|
", 1 AS count" +
|
|
|
|
", 1 AS count" +
|
|
|
|
", 1 AS unseen" +
|
|
|
|
", 1 AS unseen" +
|
|
|
|