Skip to content

Instantly share code, notes, and snippets.

@kozmi55
Created August 28, 2017 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kozmi55/59100ce47be516953d87c38e8faf17ad to your computer and use it in GitHub Desktop.
Save kozmi55/59100ce47be516953d87c38e8faf17ad to your computer and use it in GitHub Desktop.
@Dao
interface UserDao {
@Query("SELECT * FROM user ORDER BY reputation DESC LIMIT (:arg0 - 1) * 30, 30")
fun getUsers(page: Int) : List<User>
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insertAll(users: List<User>)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment