package Ġcom . mid night ge ek . test project . repo . local . interfaces Ċ Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy Ċ import Ġandroidx . room . Query Ċ import Ġcom . mid night ge ek . test project . repo . local . models . Model User Db Ċ import Ġio . reactivex . Comp letable Ċ import Ġio . reactivex . Maybe Ċ import Ġio . reactivex . Observable Ċ import Ġio . reactivex . Single ĊĊ Ċ @ Dao Ċ interface ĠUser Dao Ġ{ ĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġsave User ( data : ĠModel User Db ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġtbl _ user ") ĊĠĠĠ Ġfun Ġdelete User (): ĠComp letable ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġtbl _ user ") ĊĠĠĠ Ġfun Ġfetch User (): ĠSingle < Model User Db > ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġtbl _ user ") ĊĠĠĠ Ġfun Ġfetch CurrentUser (): ĠModel User Db Ċ Ċ }