package Ġio . staw allet . signer . data Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy Ċ import Ġandroidx . room . Query Ċ Ċ @ Dao Ċ interface ĠUser Dao Ġ{ ĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġsave ( user : ĠUser ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM ĠUser ĠWHERE Ġemail ĠNOT ĠIN Ġ(: whitelist )") ĊĠĠĠ Ġfun Ġdelete All But ( whitelist : ĠList < String >) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM ĠUser ") ĊĠĠĠ Ġfun Ġdelete All () ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM ĠUser ĠWHERE Ġemail Ġ= Ġ: email ") ĊĠĠĠ Ġfun Ġload By Email ( email : ĠString ): ĠLive Data < User > ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM ĠUser ĠLIMIT Ġ 1 ") ĊĠĠĠ Ġfun Ġload The Only One (): ĠLive Data < User > Ċ } Ċ Ċ @ Dao Ċ interface ĠSeed Dao Ġ{ ĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġsave ( seed : ĠSeed ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM ĠSeed ĠWHERE Ġfingerprint ĠNOT ĠIN Ġ(: whitelist )") ĊĠĠĠ Ġfun Ġdelete All But ( whitelist : ĠList < String >) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM ĠSeed ") ĊĠĠĠ Ġfun Ġdelete All () ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM ĠSeed ĠWHERE Ġfingerprint Ġ= Ġ: fingerprint ") ĊĠĠĠ Ġfun Ġload By Fingerprint ( fingerprint : ĠString ): ĠLive Data < Seed > ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM ĠSeed ") ĊĠĠĠ Ġfun Ġload All (): ĠLive Data < List < Seed >> ĊĊ Ċ } Ċ