Live FAQ compose

This commit is contained in:
M66B
2018-11-12 18:42:36 +01:00
parent b6d759286c
commit f2352fccb1
2 changed files with 10 additions and 24 deletions

View File

@@ -56,6 +56,12 @@ public interface DaoAccount {
@Query("SELECT * FROM account WHERE id = :id")
LiveData<EntityAccount> liveAccount(long id);
@Query("SELECT account.* FROM account" +
" JOIN folder ON folder.account = account.id" +
" WHERE (account.id = :id OR (:id IS NULL AND account.`primary`))" +
" AND folder.type = '" + EntityFolder.DRAFTS + "'")
LiveData<EntityAccount> liveAccountDraft(Long id);
@Query("SELECT" +
" (SELECT COUNT(account.id) FROM account WHERE synchronize AND state = 'connected') AS accounts" +
", (SELECT COUNT(operation.id) FROM operation" +