Revised operation handling

This commit is contained in:
M66B
2018-08-09 20:45:42 +00:00
parent 659900f6d7
commit 70a2fdee1c
21 changed files with 890 additions and 3743 deletions

View File

@@ -31,15 +31,10 @@ public interface DaoOperation {
@Insert(onConflict = OnConflictStrategy.REPLACE)
long insertOperation(EntityOperation operation);
@Query("SELECT operation.*, message.uid FROM operation" +
" JOIN message ON message.id = operation.message" +
" WHERE folder = :folder" +
" ORDER BY operation.id")
List<TupleOperationEx> getOperations(long folder);
@Query("SELECT * FROM operation WHERE folder = :folder ORDER BY id")
List<EntityOperation> getOperations(long folder);
@Query("SELECT COUNT(operation.id) FROM operation" +
" JOIN message ON message.id = operation.message" +
" WHERE folder = :folder")
@Query("SELECT COUNT(id) FROM operation WHERE folder = :folder")
int getOperationCount(long folder);
@Query("DELETE FROM operation WHERE id = :id")