package Ġcom . example . restaurant app . db Ċ Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy Ċ import Ġandroidx . room . Query Ċ import Ġcom . example . restaurant app . model . Restaurant Ċ Ċ @ Dao Ċ interface ĠRest aurant Dao Ġ{ ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . IGNORE ) ĊĠĠĠ Ġsuspend Ġfun Ġadd Restaurant ( restaurant : ĠRest aurant ) ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġrest aurants ") ĊĠĠĠ Ġsuspend Ġfun Ġget Rest aurants (): ĠList < Restaurant > ĊĊĠĠĠ Ġ@ Query (" SELECT ĠDISTINCT Ġcity ĠFROM Ġrest aurants ĠWHERE Ġcountry =: country ") ĊĠĠĠ Ġsuspend Ġfun ĠgetC ities From Country ( country : ĠString ): ĠList < String > ĊĊĠĠĠ Ġ@ Query (" SELECT ĠDISTINCT Ġcity ĠFROM Ġrest aurants ") ĊĠĠĠ Ġsuspend Ġfun ĠgetAll C ities (): ĠList < String > ĊĊĠĠĠ Ġ@ Query (" SELECT ĠCOUNT (*) ĠFROM Ġrest aurants ") ĊĠĠĠ Ġfun Ġget Restaurant Count (): ĠInt ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġrest aurants ") ĊĠĠĠ Ġsuspend Ġfun Ġdelete Rest aurants () Ċ Ċ }