|
|
@ -30,8 +30,9 @@ import androidx.room.Query;
|
|
|
|
public interface DaoAttachment {
|
|
|
|
public interface DaoAttachment {
|
|
|
|
@Query("SELECT * FROM attachment" +
|
|
|
|
@Query("SELECT * FROM attachment" +
|
|
|
|
" WHERE message = :message" +
|
|
|
|
" WHERE message = :message" +
|
|
|
|
|
|
|
|
" AND (:inline OR disposition <> 'inline')" +
|
|
|
|
" ORDER BY sequence")
|
|
|
|
" ORDER BY sequence")
|
|
|
|
LiveData<List<EntityAttachment>> liveAttachments(long message);
|
|
|
|
LiveData<List<EntityAttachment>> liveAttachments(long message, boolean inline);
|
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT ifnull(MAX(sequence), 0)" +
|
|
|
|
@Query("SELECT ifnull(MAX(sequence), 0)" +
|
|
|
|
" FROM attachment" +
|
|
|
|
" FROM attachment" +
|
|
|
|