|
|
|
@ -170,15 +170,20 @@ public interface DaoAccount {
|
|
|
|
|
@Query(TupleAccountView.query)
|
|
|
|
|
LiveData<List<TupleAccountView>> liveAccountView();
|
|
|
|
|
|
|
|
|
|
@Query("SELECT account.id" +
|
|
|
|
|
String swipes = "SELECT account.id" +
|
|
|
|
|
", account.swipe_left, l.type AS left_type, l.name AS left_name, l.color AS left_color" +
|
|
|
|
|
", account.swipe_right, r.type AS right_type, r.name AS right_name, r.color AS right_color" +
|
|
|
|
|
" FROM account" +
|
|
|
|
|
" LEFT JOIN folder_view l ON l.id = account.swipe_left" +
|
|
|
|
|
" LEFT JOIN folder_view r ON r.id = account.swipe_right" +
|
|
|
|
|
" WHERE :account IS NULL OR account.id = :account")
|
|
|
|
|
" WHERE :account IS NULL OR account.id = :account";
|
|
|
|
|
|
|
|
|
|
@Query(swipes)
|
|
|
|
|
LiveData<List<TupleAccountSwipes>> liveAccountSwipes(Long account);
|
|
|
|
|
|
|
|
|
|
@Query(swipes)
|
|
|
|
|
List<TupleAccountSwipes> getAccountSwipes(Long account);
|
|
|
|
|
|
|
|
|
|
@Insert
|
|
|
|
|
long insertAccount(EntityAccount account);
|
|
|
|
|
|
|
|
|
|