Added editing rule groups

This commit is contained in:
M66B
2023-04-14 10:07:33 +02:00
parent 4c8866585d
commit 35993af770
5 changed files with 191 additions and 6 deletions

View File

@@ -86,6 +86,11 @@ public interface DaoRule {
" WHERE id = :id AND NOT (enabled IS :enabled)")
int setRuleEnabled(long id, boolean enabled);
@Query("UPDATE rule" +
" SET `group` = :group" +
" WHERE id = :id AND NOT (`group` IS :group)")
int setRuleGroup(long id, String group);
@Query("UPDATE rule" +
" SET applied = applied + 1, last_applied = :time" +
" WHERE id = :id")