package Ġru . deb ajo . reader . rss . data . db . dao Ċ Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy Ċ import Ġandroidx . room . Query Ċ import Ġkotlinx . coroutines . flow . Flow Ċ import Ġru . deb ajo . reader . rss . data . db . model . Db Channel Subscription Ċ Ċ @ Dao Ċ interface ĠChannel Subscriptions Dao Ġ{ ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġdb channel subscription ĠORDER ĠBY Ġtimestamp ĠDESC ") ĊĠĠĠ Ġsuspend Ġfun Ġget Subscriptions (): ĠList < Db Channel Subscription > ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġdb channel subscription ĠORDER ĠBY Ġtimestamp ĠDESC ") ĊĠĠĠ Ġfun Ġobserve Subscriptions (): ĠFlow < List < Db Channel Subscription >> ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġsuspend Ġfun Ġadd ( subscription : ĠDb Channel Subscription ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġdb channel subscription ĠWHERE Ġurl =: url ") ĊĠĠĠ Ġsuspend Ġfun Ġremove ( url : ĠString ) ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġdb channel subscription ĠWHERE Ġurl =: url ") ĊĠĠĠ Ġfun Ġobserve By Url ( url : ĠString ): ĠFlow < List < Db Channel Subscription >> Ċ } Ċ