-
-
Save CristianMG/2ea6ec8831f8faf58dd4a55a64860ef3 to your computer and use it in GitHub Desktop.
Android paging Network + Database 1+2 snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Transaction | |
| @Insert(onConflict = OnConflictStrategy.REPLACE) | |
| fun insertAll(list: List<CharacterEntity>): Completable | |
| @Query(""" | |
| SELECT * FROM character ORDER BY name ASC | |
| """) | |
| fun getAllPaged(): DataSource.Factory<Int, CharacterEntity | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment