Added identity linked account

This commit is contained in:
M66B
2018-08-08 10:22:12 +00:00
parent d844734627
commit a5af366b03
18 changed files with 882 additions and 70 deletions

View File

@@ -30,8 +30,9 @@ import androidx.room.Update;
@Dao
public interface DaoIdentity {
@Query("SELECT * FROM identity")
LiveData<List<EntityIdentity>> liveIdentities();
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
" JOIN account ON account.id = identity.account")
LiveData<List<TupleIdentityEx>> liveIdentities();
@Query("SELECT * FROM identity WHERE synchronize = :synchronize")
LiveData<List<EntityIdentity>> liveIdentities(boolean synchronize);
@@ -42,9 +43,6 @@ public interface DaoIdentity {
@Query("SELECT * FROM identity WHERE id = :id")
LiveData<EntityIdentity> liveIdentity(long id);
@Query("SELECT * FROM identity ORDER BY id LIMIT 1")
LiveData<EntityIdentity> liveFirstIdentity();
@Insert(onConflict = OnConflictStrategy.REPLACE)
long insertIdentity(EntityIdentity identity);