mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-01 07:03:35 +00:00
Improve search
This commit is contained in:
@@ -36,4 +36,7 @@ public interface AlbumDao {
|
||||
|
||||
@Delete
|
||||
void delete(Album album);
|
||||
|
||||
@Query("SELECT title FROM album WHERE title LIKE :query || '%' GROUP BY title LIMIT :number")
|
||||
List<String> searchSuggestions(String query, int number);
|
||||
}
|
||||
@@ -33,4 +33,7 @@ public interface ArtistDao {
|
||||
|
||||
@Delete
|
||||
void delete(Artist artist);
|
||||
|
||||
@Query("SELECT name FROM artist WHERE name LIKE :query || '%' GROUP BY name LIMIT :number")
|
||||
List<String> searchSuggestions(String query, int number);
|
||||
}
|
||||
@@ -65,4 +65,7 @@ public interface SongDao {
|
||||
|
||||
@Query("SELECT * FROM song ORDER BY RANDOM() LIMIT :number")
|
||||
List<Song> random(int number);
|
||||
|
||||
@Query("SELECT title FROM song WHERE title LIKE :query || '%' GROUP BY title LIMIT :number")
|
||||
List<String> searchSuggestions(String query, int number);
|
||||
}
|
||||
Reference in New Issue
Block a user