package Ġcom . v ito val ov . ex ch anger ates live . data . local Ċ Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy Ċ import Ġandroidx . room . Query Ċ import Ġcom . v ito val ov . ex ch anger ates live . data . local . model . User Changes Entity Ċ import Ġio . reactivex . Comp letable Ċ import Ġio . reactivex . Flow able Ċ Ċ @ Dao Ċ interface ĠUser Changes Dao Ġ{ ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġinsert ( user Changes Entity : ĠUser Changes Entity ): ĠComp letable ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġuser _ currency _ changes ") ĊĠĠĠ Ġfun Ġobserve User Amount Changes (): ĠFlow able < User Changes Entity > ĊĊĠĠĠ Ġ@ Query (" UPDATE Ġuser _ currency _ changes ĠSET Ġselected _ currency _ amount Ġ= Ġ: currency Amount ") ĊĠĠĠ Ġfun Ġupdate User Amount ( currency Amount : ĠString ): ĠComp letable ĊĊĠĠĠ Ġ@ Query (" UPDATE Ġuser _ currency _ changes ĠSET Ġselected _ currency _ code Ġ= Ġ: base Currency Code ") ĊĠĠĠ Ġfun Ġupdate User Base Currency ( base Currency Code : ĠString ): ĠComp letable Ċ }