package Ġcom . sec . weather . repository Ċ Ċ import Ġcom . sec . weather . data . Weather Dao Ċ import Ġcom . sec . weather . model . Favorite Ċ import Ġkotlinx . coroutines . flow . Flow Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠWeather Db Repository Ġ@ Inject Ġconstructor ( private Ġval Ġweather Dao : ĠWeather Dao ) Ġ{ ĊĠĠĠ Ġfun Ġget F avorites (): ĠFlow < List < Favorite >> Ġ= Ġweather Dao . getF avorites () ĊĠĠĠ Ġsuspend Ġfun Ġinsert Favorite ( favorite : ĠF avorite ) Ġ= Ġweather Dao . insert Favorite ( favorite ) ĊĠĠĠ Ġsuspend Ġfun Ġupdate Favorite ( favorite : ĠF avorite ) Ġ= Ġweather Dao . update Favorite ( favorite ) ĊĠĠĠ Ġsuspend Ġfun Ġdelete All F avorites () Ġ= Ġweather Dao . delete All F avorites () ĊĠĠĠ Ġsuspend Ġfun Ġdelete Favorite ( favorite : ĠF avorite ) Ġ= Ġweather Dao . delete Favorite ( favorite ) ĊĠĠĠ Ġsuspend Ġfun Ġget Fav ById ( id : ĠString ): ĠF avorite Ġ= Ġweather Dao . getF av ById ( id ) Ċ }