CurrencyDao.kt 417 B

1234567891011121314151617
  1. package com.mrozon.currencyconverter.data.db
  2. import androidx.room.Dao
  3. import androidx.room.Insert
  4. import androidx.room.OnConflictStrategy
  5. import androidx.room.Query
  6. import kotlinx.coroutines.flow.Flow
  7. @Dao
  8. interface CurrencyDao {
  9. @Insert(onConflict = OnConflictStrategy.REPLACE)
  10. suspend fun insertAll(plants: List<ValuteDb>)
  11. @Query("SELECT * FROM valutes")
  12. fun getPlants(): Flow<List<ValuteDb>>
  13. }