package Ġcom . mv f kotlin . my application . database Ċ Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy Ċ import Ġandroidx . room . Query Ċ Ċ @ Dao Ċ interface ĠDb Dao Ġ{ ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert C ashing Item ( db Entity C ashing : ĠC ashing Database Entity ): ĠLong ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert Favorite Item ( db Entity C ashing : ĠF avorite Database Entity ): ĠLong ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġc ashing _ items ") ĊĠĠĠ Ġsuspend Ġfun ĠgetAll (): ĠList < C ashing Database Entity > ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġfavorite _ items ") ĊĠĠĠ Ġsuspend Ġfun ĠgetAll Favorite Items (): ĠList < Favorite Database Entity > ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġfavorite _ items ĠWHERE Ġid Ġ= Ġ: deleted Id ") ĊĠĠĠ Ġsuspend Ġfun Ġdelete Item ( deleted Id : ĠInt ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġc ashing _ items ") ĊĠĠĠ Ġsuspend Ġfun Ġclear Cas hed Items () Ċ Ċ // ĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġdaily _ sleep _ quality _ table ") Ċ // ĠĠĠ Ġsuspend Ġfun Ġclear Favorite Items () Ċ }