Revert "Reduce number of invalidations"

This reverts commit 845eff88b4.
This commit is contained in:
M66B
2019-06-07 18:33:35 +02:00
parent 57a9d0ae54
commit f5132de1f4
13 changed files with 59 additions and 242 deletions

View File

@@ -30,13 +30,13 @@ import java.util.List;
@Dao
public interface DaoIdentity {
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
" JOIN accountprop AS account ON account.id = identity.account" +
" JOIN account ON account.id = identity.account" +
" WHERE NOT :synchronize OR account.synchronize")
LiveData<List<TupleIdentityEx>> liveIdentities(boolean synchronize);
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
" JOIN accountprop AS account ON account.id = identity.account" +
" JOIN folderprop AS folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
" JOIN account ON account.id = identity.account" +
" JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
" WHERE (:account IS NULL OR identity.account = :account)" +
" AND identity.synchronize" +
" AND account.synchronize" +
@@ -45,8 +45,8 @@ public interface DaoIdentity {
List<TupleIdentityEx> getComposableIdentities(Long account);
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
" JOIN accountprop AS account ON account.id = identity.account" +
" JOIN folderprop AS folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
" JOIN account ON account.id = identity.account" +
" JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
" WHERE (:account IS NULL OR identity.account = :account)" +
" AND identity.synchronize" +
" AND account.synchronize")