Made operations available without debug mode

This commit is contained in:
M66B
2018-12-11 09:47:37 +01:00
parent fb397b3e82
commit 93d7dd19a1
7 changed files with 175 additions and 73 deletions

View File

@@ -38,8 +38,12 @@ public interface DaoOperation {
", id")
List<EntityOperation> getOperationsByFolder(long folder, boolean outbox);
@Query("SELECT * FROM operation ORDER BY id")
LiveData<List<EntityOperation>> liveOperations();
@Query("SELECT operation.*, account.name AS accountName, folder.name AS folderName" +
" FROM operation" +
" JOIN folder ON folder.id = operation.folder" +
" JOIN account ON account.id = folder.account" +
" ORDER BY operation.id")
LiveData<List<TupleOperationEx>> liveOperations();
@Query("SELECT * FROM operation WHERE folder = :folder ORDER BY id")
LiveData<List<EntityOperation>> liveOperations(long folder);
@@ -47,6 +51,9 @@ public interface DaoOperation {
@Query("SELECT * FROM operation ORDER BY id")
List<EntityOperation> getOperations();
@Query("SELECT * FROM operation ORDER BY id LIMIT 1")
EntityOperation getOperationFirst();
@Query("SELECT COUNT(id) FROM operation" +
" WHERE folder = :folder" +
" AND (:name IS NULL OR operation.name = :name)")