package Ġtech . sal vat ore . liv ro _ android _ kotlin _ p au lo _ sal vat ore . model . source . local . db . dao Ċ Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy . REPLACE Ċ import Ġandroidx . room . Query Ċ import Ġandroidx . room . Transaction Ċ import Ġio . reactivex . rx java 3 . core . Flow able Ċ import Ġio . reactivex . rx java 3 . core . Single Ċ import Ġtech . sal vat ore . liv ro _ android _ kotlin _ p au lo _ sal vat ore . model . source . local . db . entity . User Entity Ċ import Ġtech . sal vat ore . liv ro _ android _ kotlin _ p au lo _ sal vat ore . model . source . local . db . entity . User Entity With User Creature Entity Ċ Ċ @ Dao Ċ interface ĠUser Dao Ġ{ ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġuser ") ĊĠĠĠ Ġfun ĠfindAll (): ĠFlow able < List < User Entity >> ĊĊĠĠĠ Ġ@ Transaction ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġuser ĠWHERE Ġid Ġ= Ġ: id ") ĊĠĠĠ Ġfun Ġfind ById ( id : ĠLong ): ĠFlow able < User Entity With User Creature Entity > ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠREPLACE ) ĊĠĠĠ Ġfun Ġinsert ( user : ĠUser Entity ): ĠSingle < Long > Ċ } Ċ