package Ġcom . fir er ocks . what the weather . data . db Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy Ċ import Ġandroidx . room . Query Ċ import Ġcom . fir er ocks . what the weather . data . db . entity . Future Weather Entry Ċ import Ġcom . fir er ocks . what the weather . data . db . unit localized . future . detail . Imp erial Detail Future Weather Entry Ċ import Ġcom . fir er ocks . what the weather . data . db . unit localized . future . detail . Metric Detail Future Weather Entry Ċ import Ġcom . fir er ocks . what the weather . data . db . unit localized . future . list . Imp erial Simple Future Weather Entry Ċ import Ġcom . fir er ocks . what the weather . data . db . unit localized . future . list . Metric Simple Future Weather Entry Ċ import Ġorg . th reet en . bp . LocalDate Ċ Ċ @ Dao Ċ interface ĠFuture Weather Dao Ġ{ ĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġinsert ( future Weather Entries : ĠList < Future Weather Entry >) ĊĊĠĠĠ Ġ@ Query (" select Ġ* Ġfrom Ġfuture _ weather Ġwhere Ġdate ( date ) Ġ>= Ġdate (: startDate )") ĊĠĠĠ Ġfun Ġget Simple Weather Forecast Metric ( startDate : ĠLocalDate ) Ġ: ĠLive Data < List < Metric Simple Future Weather Entry >> ĊĊĠĠĠ Ġ@ Query (" select Ġ* Ġfrom Ġfuture _ weather Ġwhere Ġdate ( date ) Ġ>= Ġdate (: startDate )") ĊĠĠĠ Ġfun Ġget Simple Weather Forecast Imp erial ( startDate : ĠLocalDate ) Ġ: ĠLive Data < List < Imp erial Simple Future Weather Entry >> ĊĊĠĠĠ Ġ@ Query (" select Ġcount ( id ) Ġfrom Ġfuture _ weather Ġwhere Ġdate ( date ) Ġ>= Ġdate (: startDate )") ĊĠĠĠ Ġfun Ġcount Future Weather ( startDate : ĠLocalDate ): ĠInt ĊĊĠĠĠ Ġ@ Query (" delete Ġfrom Ġfuture _ weather Ġwhere Ġdate ( date ) Ġ< Ġdate (: first Date To Keep )") ĊĠĠĠ Ġfun Ġdelete Old Entries ( first Date To Keep : ĠLocalDate ) ĊĊĠĠĠ Ġ@ Query (" select Ġ* Ġfrom Ġfuture _ weather Ġwhere Ġdate ( date ) Ġ= Ġdate (: date )") ĊĠĠĠ Ġfun Ġget Detail Weather By Date Imp erial ( date : ĠLocalDate ) Ġ: ĠLive Data < Imp erial Detail Future Weather Entry > ĊĊĠĠĠ Ġ@ Query (" select Ġ* Ġfrom Ġfuture _ weather Ġwhere Ġdate ( date ) Ġ= Ġdate (: date )") ĊĠĠĠ Ġfun Ġget Detail Weather By Date Metric ( date : ĠLocalDate ) Ġ: ĠLive Data < Metric Detail Future Weather Entry > Ċ }