mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 02:13:33 +00:00
Improve search
This commit is contained in:
parent
4848d4f3d0
commit
6c26c6d889
17 changed files with 243 additions and 69 deletions
|
|
@ -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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue