Guest User

Untitled

a guest
Jul 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. @Dao
  2. public interface SomeDao {
  3. @Query("SELECT * FROM SomeDao")
  4. Flowable<List<SomeDao>> getAll();
  5.  
  6. @Insert(onConflict = OnConflictStrategy.REPLACE)
  7. void insert(List<SomeDao> daos);
  8.  
  9. @Query("SELECT * FROM SomeDao where id = :id")
  10. Flowable<SomeDao> getById(int id);
  11.  
  12. @Query("DELETE FROM SomeDao")
  13. void deleteAll();
  14. }
Add Comment
Please, Sign In to add comment