/* Ċ Ġ* ĠCopyright Ġ( C ) Ġ 2 0 1 8 ĠSn ey der ĠAng ulo Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġcom . sn ey der . crypto tracker . data . database Ċ Ċ import Ġandroid . arch . persistence . room . Dao Ċ import Ġandroid . arch . persistence . room . Insert Ċ import Ġandroid . arch . persistence . room . On Conflict Strategy Ċ import Ġandroid . arch . persistence . room . Query Ċ import Ġcom . sn ey der . crypto tracker . data . model . Exchange Rate Ċ import Ġcom . sn ey der . utils . Base Dao Ċ import Ġio . reactivex . Flow able Ċ Ċ @ Dao Ċ abstract Ġclass ĠExchange Rate Dao Ġ: ĠBase Dao < Exchange Rate > Ġ{ ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġ${ Exchange Rate . TABLE _ NAME }") ĊĠĠĠ Ġabstract Ġfun Ġfind Exchange Rates (): ĠFlow able < List < Exchange Rate >> ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġ${ Exchange Rate . TABLE _ NAME } ĠWHERE Ġsymbol Ġ= Ġ: symbol ") ĊĠĠĠ Ġabstract Ġfun Ġfind Exchange Rate For Symbol ( symbol : ĠString ): ĠFlow able < Exchange Rate > ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġabstract Ġfun Ġinsert Exchange Rates ( var arg Ġexchange Rates : ĠExchange Rate ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġ${ Exchange Rate . TABLE _ NAME }") ĊĠĠĠ Ġabstract Ġfun Ġdelete Table () Ċ Ċ }