package Ġspace . nab oo . te les am . db . dao Ċ Ċ import Ġandroid . arch . persistence . room . Dao Ċ import Ġandroid . arch . persistence . room . Insert Ċ import Ġandroid . arch . persistence . room . On Conflict Strategy Ċ import Ġandroid . arch . persistence . room . Query Ċ import Ġio . reactivex . Maybe Ċ import Ġspace . nab oo . te les am . model . Dialog Ċ Ċ @ Dao Ċ interface ĠDialog Dao Ġ{ ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġ${ Dialog . TABLE _ NAME } ĠLIMIT Ġ 1 ") ĊĠĠĠ Ġfun Ġload (): ĠMaybe < Dialog > ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġinsert ( dialog : ĠDialog ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġ${ Dialog . TABLE _ NAME }") ĊĠĠĠ Ġfun Ġdelete All () ĊĊĠĠĠ Ġ@ Query (" SELECT ĠCount (*) ĠFROM Ġ${ Dialog . TABLE _ NAME }") ĊĠĠĠ Ġfun Ġcount (): ĠInt Ċ } Ċ