Modified operation priorities

This commit is contained in:
M66B 2020-07-03 08:40:52 +02:00
parent e105a639b3
commit 960f970771
1 changed files with 5 additions and 2 deletions

View File

@ -33,11 +33,14 @@ public interface DaoOperation {
" WHEN operation.name = '" + EntityOperation.BODY + "' THEN -4" +
" WHEN operation.name = '" + EntityOperation.ATTACHMENT + "' THEN -3" +
" WHEN operation.name = '" + EntityOperation.HEADERS + "' THEN -2" +
" WHEN operation.name = '" + EntityOperation.SYNC + "' THEN" +
" CASE WHEN folder.account IS NULL THEN -1 ELSE 1 END" + // outbox
" WHEN operation.name = '" + EntityOperation.RAW + "' THEN -2" +
" WHEN operation.name = '" + EntityOperation.SYNC + "' AND folder.account IS NULL THEN -1" + // Outbox
" WHEN operation.name = '" + EntityOperation.SYNC + "' AND folder.account IS NOT NULL THEN 1" +
// Other operations: add, delete, seen, answered, flag, keyword, label, subscribe, send
" WHEN operation.name = '" + EntityOperation.FETCH + "' THEN 2" +
" WHEN operation.name = '" + EntityOperation.EXISTS + "' THEN 3" +
" WHEN operation.name = '" + EntityOperation.MOVE + "' THEN 4" +
" WHEN operation.name = '" + EntityOperation.COPY + "' THEN 4" +
" ELSE 0" +
" END";