Reputation: 1
@Dao
interface CoinPriceInfoDao {
@Query("SELECT * FROM full_price_list ORDER BY lastupdate")
fun getPriceList(): LiveData<List<CoinPriceInfo>
@Query("SELECT * FROM full_price_list WHERE fromsymbol == :fSym LIMIT 1")
fun getPriceInfoAboutCoin(fSym: String): LiveData<CoinPriceInfo>
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insertPriceList(priceList: List<CoinPriceInfo>)
}
I have an error for the first two Queries What should I do?
Upvotes: 0
Views: 362
Reputation: 1
The error you're encountering likely stems from using the wrong @Query annotation. Your code snippet defines queries for a Room database, so you should be using import androidx.room.Query instead of import retrofit2.http.Query.
Upvotes: -1