package Ġcom . shu he ik gy . code labs _ android _ room _ with _ a _ view . database Ċ Ċ import Ġcom . shu he ik gy . code labs _ android _ room _ with _ a _ view . dao . Word Dao Ċ import Ġcom . shu he ik gy . code labs _ android _ room _ with _ a _ view . entity . Word Ċ import Ġkotlinx . coroutines . experimental . Common Pool Ċ import Ġkotlinx . coroutines . experimental . async Ċ Ċ class ĠPopulate Database ( database : ĠWord Room Database ) Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġdao : ĠWord Dao ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġdao Ġ= Ġdatabase . word Dao () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġpopulate Database () Ġ= Ġasync ( Common Pool ) Ġ{ ĊĠĠĠĠĠĠĠ Ġdao . delete All () ĊĠĠĠĠĠĠĠ Ġvar Ġword Ġ= ĠWord (" Hello ") ĊĠĠĠĠĠĠĠ Ġdao . insert ( word ) ĊĠĠĠĠĠĠĠ Ġword Ġ= ĠWord (" World ") ĊĠĠĠĠĠĠĠ Ġdao . insert ( word ) ĊĠĠĠĠĠĠĠ Ġreturn @ async ĊĠĠĠ Ġ} Ċ Ċ }