|
|
@ -105,11 +105,10 @@ public interface DaoAttachment {
|
|
|
|
" JOIN folder ON folder.id = message.folder" +
|
|
|
|
" JOIN folder ON folder.id = message.folder" +
|
|
|
|
" WHERE a.id = attachment.id" +
|
|
|
|
" WHERE a.id = attachment.id" +
|
|
|
|
" AND a.available" +
|
|
|
|
" AND a.available" +
|
|
|
|
" AND (message.stored < :now - folder.sync_days * 24 * 3600 * 1000" +
|
|
|
|
" AND message.ui_seen" +
|
|
|
|
" OR (:extra AND" +
|
|
|
|
" AND NOT message.ui_flagged" +
|
|
|
|
" (folder.type = '" + EntityFolder.TRASH + "'" +
|
|
|
|
" AND message.received < :now - (folder.sync_days + 1) * 24 * 3600 * 1000)")
|
|
|
|
" OR folder.type = '" + EntityFolder.JUNK + "'))))")
|
|
|
|
int purge(long now);
|
|
|
|
int purge(long now, boolean extra);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Insert
|
|
|
|
@Insert
|
|
|
|
long insertAttachment(EntityAttachment attachment);
|
|
|
|
long insertAttachment(EntityAttachment attachment);
|
|
|
|