Search custom labels
This commit is contained in:
@@ -19,4 +19,7 @@ interface CustomAttrsDao {
|
||||
|
||||
@Query("SELECT * FROM CustomAttributes WHERE type = :type AND key IN (:keys)")
|
||||
fun getCustomAttributes(keys: List<String>, type: String) : Flow<List<CustomAttributeEntity>>
|
||||
|
||||
@Query("SELECT DISTINCT key FROM CustomAttributes WHERE (type = 'label' OR type = 'tag') AND value LIKE :query")
|
||||
fun search(query: String): Flow<List<String>>
|
||||
}
|
||||
@@ -106,6 +106,9 @@ interface SearchDao {
|
||||
@Query("SELECT * FROM Searchable WHERE `key` = :key")
|
||||
fun getFavorite(key: String): FavoritesItemEntity?
|
||||
|
||||
@Query("SELECT * FROM Searchable WHERE `key` IN (:keys)")
|
||||
fun getFromKeys(keys: List<String>): List<FavoritesItemEntity>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
fun insertReplaceExisting(toDatabaseEntity: FavoritesItemEntity)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user