package Ġio . horizontal systems . bank wallet . core . storage Ċ Ċ import Ġandroidx . room .* Ċ import Ġio . horizontal systems . bank wallet . entities . Coin Type Ċ Ċ @ Dao Ċ interface ĠMarket F avorites Dao Ġ{ ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġinsert ( favorite Coin : ĠF avorite Coin ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM ĠF avorite Coin ĠWHERE Ġcode Ġ= Ġ: coin Code ") ĊĠĠĠ Ġfun Ġdelete ( coin Code : ĠString ) ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM ĠF avorite Coin ") ĊĠĠĠ Ġfun ĠgetAll (): ĠList < Favorite Coin > ĊĊĠĠĠ Ġ@ Query (" SELECT ĠCOUNT (*) ĠFROM ĠF avorite Coin ĠWHERE Ġcode Ġ= Ġ: coin Code ") ĊĠĠĠ Ġfun Ġget Count ( coin Code : ĠString ): ĠInt Ċ Ċ } Ċ Ċ @ Entity Ċ data Ġclass ĠF avorite Coin ( val Ġcode : ĠString ) Ġ{ ĊĠĠĠ Ġ@ PrimaryKey ( auto Generate Ġ= Ġtrue ) ĊĠĠĠ Ġvar Ġid : ĠInt ? Ġ= Ġnull Ċ } Ċ