Modified sql queries used to retrieving downloaded artists and albums

This commit is contained in:
CappielloAntonio 2021-08-31 09:11:42 +02:00
parent 7d6ad5737f
commit ac584974c6
4 changed files with 15 additions and 20 deletions

View file

@ -15,6 +15,12 @@ public interface DownloadDao {
@Query("SELECT * FROM download WHERE server=:server")
LiveData<List<Download>> getAll(String server);
@Query("SELECT * FROM download WHERE server=:server GROUP BY artistName LIMIT :size")
LiveData<List<Download>> getSampleArtist(int size, String server);
@Query("SELECT * FROM download WHERE server=:server GROUP BY albumName LIMIT :size")
LiveData<List<Download>> getSampleAlbum(int size, String server);
@Query("SELECT * FROM download WHERE server=:server LIMIT :size")
LiveData<List<Download>> getSample(int size, String server);