package Ġio . homeassistant . comp anion . android . database . notification Ċ Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy Ċ import Ġandroidx . room . Query Ċ Ċ @ Dao Ċ interface ĠNotification Dao Ġ{ ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġnotification _ history ĠWHERE Ġid Ġ= Ġ: id ") ĊĠĠĠ Ġfun Ġget ( id : ĠInt ): ĠNotification Item ? ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġadd ( notification : ĠNotification Item ) ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġnotification _ history ĠORDER ĠBY Ġreceived ĠDESC ") ĊĠĠĠ Ġfun ĠgetAll (): ĠArray < Notification Item >? ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġnotification _ history ĠORDER ĠBY Ġreceived ĠDESC ĠLIMIT Ġ(: amount )") ĊĠĠĠ Ġfun ĠgetLast Items ( amount : ĠInt ): ĠArray < Notification Item >? ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġnotification _ history ĠWHERE Ġid Ġ= Ġ: id ") ĊĠĠĠ Ġsuspend Ġfun Ġdelete ( id : ĠInt ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġnotification _ history ") ĊĠĠĠ Ġsuspend Ġfun Ġdelete All () Ċ } Ċ