Prevent operation invalidation

This commit is contained in:
M66B 2020-11-29 10:33:19 +01:00
parent 415469fb7e
commit 6299eaa317
1 changed files with 4 additions and 4 deletions

View File

@ -126,16 +126,16 @@ public interface DaoOperation {
" AND name = :name")
int getOperationCount(long folder, long message, String name);
@Query("UPDATE operation SET tries = :tries WHERE id = :id")
@Query("UPDATE operation SET tries = :tries WHERE id = :id AND tries <> :tries")
int setOperationTries(long id, int tries);
@Query("UPDATE operation SET state = :state WHERE id = :id")
@Query("UPDATE operation SET state = :state WHERE id = :id AND state <> :state")
int setOperationState(long id, String state);
@Query("UPDATE operation SET state = NULL")
@Query("UPDATE operation SET state = NULL WHERE state IS NOT NULL")
int resetOperationStates();
@Query("UPDATE operation SET error = :error WHERE id = :id")
@Query("UPDATE operation SET error = :error WHERE id = :id AND error <> :error")
int setOperationError(long id, String error);
@Insert