Guest User

Untitled

a guest
Nov 14th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. package fr.ippon.androidaacsample.coinsentinel.db
  2.  
  3. import androidx.lifecycle.LiveData
  4. import androidx.room.Dao
  5. import androidx.room.Insert
  6. import androidx.room.OnConflictStrategy
  7. import androidx.room.Query
  8.  
  9. @Dao
  10. interface CoinDao {
  11. @Insert(onConflict = OnConflictStrategy.REPLACE)
  12. fun insertAll(coins: Array<Coin>)
  13.  
  14. @Query("SELECT * FROM COIN ORDER BY rank ASC")
  15. fun getAll(): LiveData<Array<Coin>>
  16. }
Add Comment
Please, Sign In to add comment