package Ġcom . dd ona . bank ing . local . database Ċ Ċ import Ġandroidx . room .* Ċ import Ġcom . dd ona . bank ing . local . model . Transaction Local Ċ import Ġio . reactivex . Comp letable Ċ import Ġio . reactivex . Observable Ċ Ċ @ Dao Ċ interface ĠTransaction DAO Ġ{ ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġtransactions ĠORDER ĠBY Ġtransaction _ timestamp ĠDESC ĠLIMIT Ġ: limit ") ĊĠĠĠ Ġfun ĠgetUser Transactions ( limit : ĠInt ): ĠObservable < List < Transaction Local >> ĊĊĠĠĠ Ġ@ Update ĊĠĠĠ Ġfun Ġupdate Transaction ( transaction : ĠTransaction Local ): ĠComp letable ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . IGNORE ) ĊĠĠĠ Ġfun Ġadd Transactions ( transactions : ĠList < Transaction Local >) ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġtransactions ĠWHERE Ġtransaction _ id Ġ= Ġ: transaction Id ") ĊĠĠĠ Ġfun Ġget Transaction ById ( transaction Id : ĠString ): ĠObservable < Transaction Local > ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġtransactions ") ĊĠĠĠ Ġfun Ġclear Cached Transactions (): ĠComp letable Ċ }