Match attachments by properties

This commit is contained in:
M66B
2019-05-08 10:32:37 +02:00
parent 61f7a2f692
commit 4cf330dfb6
11 changed files with 1807 additions and 57 deletions

View File

@@ -59,7 +59,8 @@ public interface DaoAttachment {
@Query("SELECT * FROM attachment" +
" WHERE message = :message" +
" AND cid = :cid")
" AND cid = :cid" +
" LIMIT 1")
EntityAttachment getAttachment(long message, String cid);
@Query("UPDATE attachment" +
@@ -67,11 +68,6 @@ public interface DaoAttachment {
" WHERE id = :id")
void setMessage(long id, long message);
@Query("UPDATE attachment" +
" SET name = :name, type = :type, disposition = :disposition, cid = :cid, encryption = :encryption" +
" WHERE id = :id")
void setInfo(long id, String name, String type, String disposition, String cid, Integer encryption);
@Query("UPDATE attachment" +
" SET error = NULL, progress = :progress, available = 0" +
" WHERE id = :id")