|
|
@ -44,6 +44,7 @@ public interface DaoFolder {
|
|
|
|
", COUNT(DISTINCT message.id) AS messages" +
|
|
|
|
", COUNT(DISTINCT message.id) AS messages" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.content = 1 THEN message.id ELSE NULL END) AS content" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.content = 1 THEN message.id ELSE NULL END) AS content" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN NOT message.ui_seen THEN message.id ELSE NULL END) AS unseen" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN NOT message.ui_seen THEN message.id ELSE NULL END) AS unseen" +
|
|
|
|
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.received > folder.last_view THEN message.id ELSE NULL END) AS unexposed" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.ui_flagged THEN message.id ELSE NULL END) AS flagged" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.ui_flagged THEN message.id ELSE NULL END) AS flagged" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN operation.state = 'executing' THEN operation.id ELSE NULL END) AS executing" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN operation.state = 'executing' THEN operation.id ELSE NULL END) AS executing" +
|
|
|
|
" FROM folder" +
|
|
|
|
" FROM folder" +
|
|
|
@ -84,6 +85,7 @@ public interface DaoFolder {
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.ui_hide THEN NULL ELSE message.id END) AS messages" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.ui_hide THEN NULL ELSE message.id END) AS messages" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.content = 1 AND NOT message.ui_hide THEN message.id ELSE NULL END) AS content" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.content = 1 AND NOT message.ui_hide THEN message.id ELSE NULL END) AS content" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN NOT message.ui_seen AND NOT message.ui_hide THEN message.id ELSE NULL END) AS unseen" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN NOT message.ui_seen AND NOT message.ui_hide THEN message.id ELSE NULL END) AS unseen" +
|
|
|
|
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.received > folder.last_view AND NOT message.ui_hide THEN message.id ELSE NULL END) AS unexposed" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.ui_flagged AND NOT message.ui_hide THEN message.id ELSE NULL END) AS flagged" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.ui_flagged AND NOT message.ui_hide THEN message.id ELSE NULL END) AS flagged" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN operation.state = 'executing' THEN operation.id ELSE NULL END) AS executing" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN operation.state = 'executing' THEN operation.id ELSE NULL END) AS executing" +
|
|
|
|
" FROM folder" +
|
|
|
|
" FROM folder" +
|
|
|
@ -108,6 +110,7 @@ public interface DaoFolder {
|
|
|
|
", COUNT(DISTINCT message.id) AS messages" +
|
|
|
|
", COUNT(DISTINCT message.id) AS messages" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.content = 1 THEN message.id ELSE NULL END) AS content" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.content = 1 THEN message.id ELSE NULL END) AS content" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN NOT message.ui_seen THEN message.id ELSE NULL END) AS unseen" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN NOT message.ui_seen THEN message.id ELSE NULL END) AS unseen" +
|
|
|
|
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.received > folder.last_view THEN message.id ELSE NULL END) AS unexposed" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.ui_flagged THEN message.id ELSE NULL END) AS flagged" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.ui_flagged THEN message.id ELSE NULL END) AS flagged" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN operation.state = 'executing' THEN operation.id ELSE NULL END) AS executing" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN operation.state = 'executing' THEN operation.id ELSE NULL END) AS executing" +
|
|
|
|
" FROM folder" +
|
|
|
|
" FROM folder" +
|
|
|
@ -141,6 +144,7 @@ public interface DaoFolder {
|
|
|
|
", COUNT(DISTINCT message.id) AS messages" +
|
|
|
|
", COUNT(DISTINCT message.id) AS messages" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.content = 1 THEN message.id ELSE NULL END) AS content" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.content = 1 THEN message.id ELSE NULL END) AS content" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN NOT message.ui_seen THEN message.id ELSE NULL END) AS unseen" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN NOT message.ui_seen THEN message.id ELSE NULL END) AS unseen" +
|
|
|
|
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.received > folder.last_view THEN message.id ELSE NULL END) AS unexposed" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.ui_flagged THEN message.id ELSE NULL END) AS flagged" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN message.ui_flagged THEN message.id ELSE NULL END) AS flagged" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN operation.state = 'executing' THEN operation.id ELSE NULL END) AS executing" +
|
|
|
|
", COUNT(DISTINCT CASE WHEN operation.state = 'executing' THEN operation.id ELSE NULL END) AS executing" +
|
|
|
|
" FROM folder" +
|
|
|
|
" FROM folder" +
|
|
|
@ -190,6 +194,7 @@ public interface DaoFolder {
|
|
|
|
", COUNT(DISTINCT folder.id) AS folders" +
|
|
|
|
", COUNT(DISTINCT folder.id) AS folders" +
|
|
|
|
", COUNT(message.id) AS messages" +
|
|
|
|
", COUNT(message.id) AS messages" +
|
|
|
|
", SUM(CASE WHEN NOT message.ui_seen THEN 1 ELSE 0 END) AS unseen" +
|
|
|
|
", SUM(CASE WHEN NOT message.ui_seen THEN 1 ELSE 0 END) AS unseen" +
|
|
|
|
|
|
|
|
", SUM(CASE WHEN message.received > folder.last_view THEN 1 ELSE 0 END) AS unexposed" +
|
|
|
|
", CASE WHEN folder.account IS NULL THEN folder.sync_state ELSE NULL END AS sync_state" +
|
|
|
|
", CASE WHEN folder.account IS NULL THEN folder.sync_state ELSE NULL END AS sync_state" +
|
|
|
|
", folder.color, COUNT (DISTINCT folder.color) AS colorCount" +
|
|
|
|
", folder.color, COUNT (DISTINCT folder.color) AS colorCount" +
|
|
|
|
" FROM folder" +
|
|
|
|
" FROM folder" +
|
|
|
|