package Ġcom . chen . new splash . db . dao Ċ Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy Ċ import Ġandroidx . room . Query Ċ import Ġcom . chen . new splash . models . photos . Photo Ċ import Ġio . reactivex . Maybe Ċ Ċ @ Dao Ċ interface ĠF avorite DAO Ġ{ ĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġinsert Photos ( var arg Ġphoto : Photo ): Maybe < List < Long >> ĊĊĠĠĠ Ġ@ Query (" select Ġ* Ġfrom Ġphotos Ġorder Ġby Ġp _ id Ġdesc Ġlimit Ġ 1 0 Ġoffset Ġ: offset ") ĊĠĠĠ Ġfun Ġquery Photo ( offset : Int ): Maybe < List < Photo >> ĊĊĠĠĠ Ġ@ Query (" select Ġ* Ġfrom Ġphotos Ġwhere Ġid Ġ= Ġ: id ") ĊĠĠĠ Ġfun Ġquery Photo ByID ( id : String ): Maybe < List < Photo >> ĊĊĠĠĠ Ġ@ Query (" delete Ġfrom Ġphotos Ġwhere Ġid Ġ= Ġ: id ") ĊĠĠĠ Ġfun Ġdelete Photo ByID ( id : String ): Maybe < Int > ĊĊĠĠĠ Ġ@ Query (" delete Ġfrom Ġphotos ") ĊĠĠĠ Ġfun Ġdelete All (): Maybe < Int > Ċ }