Skip to content

Instantly share code, notes, and snippets.

@deskid
Created June 20, 2017 09:48
Show Gist options
  • Save deskid/ea60cd28793f537b1b9ee40333a6aa66 to your computer and use it in GitHub Desktop.
Save deskid/ea60cd28793f537b1b9ee40333a6aa66 to your computer and use it in GitHub Desktop.
android-room-select-query-with-like
@Query("SELECT * FROM hamster WHERE name LIKE '%' || :arg0 || '%'")
fun loadHamsters(search: String?): Flowable<List<Hamster>>
@Sharabaddin
Copy link

plz analog for java))

@RatmirEspo
Copy link

@query("SELECT * FROM hamster WHERE name LIKE '%'||: arg0 ||'%'")
Maybe<List> getAllSerialsNamesByPatterns(String serialName);

@lxhau
Copy link

lxhau commented Nov 27, 2020

@query("SELECT * FROM hamster WHERE name LIKE '%'||: arg0 ||'%'")
Maybe getAllSerialsNamesByPatterns(String serialName);

Djt Me Hay Vai Lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment