package Ġcom . pl w ee g ie . android . tell adog . 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 ĠPrediction Dao Ġ{ ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġpredictions ") ĊĠĠĠ Ġfun ĠgetAll Pred i ctions (): ĠLive Data < List < Dog Prediction >> ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġinsert Prediction ( prediction : ĠDog Prediction ) ĊĊĠĠĠ Ġ@ Query (" UPDATE Ġpredictions ĠSET Ġsync _ state Ġ= Ġ: sync State ĠWHERE Ġtimestamp Ġ= Ġ: prediction Id ") ĊĠĠĠ Ġfun Ġupdate Prediction ( prediction Id : ĠLong ?, Ġsync State : ĠInt ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġpredictions ĠWHERE Ġtimestamp Ġ= Ġ: prediction Id ") ĊĠĠĠ Ġfun Ġdelete Prediction ( prediction Id : ĠLong ?) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġpredictions ") ĊĠĠĠ Ġfun Ġdelete All () Ċ }