package Ġcom . be bes a uri os . x com 2 . database . dao Ċ Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Query Ċ import Ġcom . be bes a uri os . x com 2 . database . dao . base . Base Dao Ċ import Ġcom . be bes a uri os . x com 2 . database . entities . Search Entity Ċ Ċ @ Dao Ċ interface ĠSearch Dao Ġ: ĠBase Dao < Search Entity > Ġ{ ĊĠĠĠ Ġ@ Query (" SELECT Ġ* Ġfrom Ġsearches ") ĊĠĠĠ Ġfun ĠgetAll () Ġ: ĠList < Search Entity > ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* Ġfrom Ġsearches Ġwhere Ġkeyword ĠIN Ġ( SELECT ĠDISTINCT Ġkey Ġfrom Ġkeywords ĠWHERE Ġword Ġlike Ġ: search Result ) ĠGROUP ĠBY Ġarticle ĠORDER Ġby Ġweight ĠDESC ") ĊĠĠĠ Ġfun Ġfind ( search Result : ĠString ) Ġ: ĠList < Search Entity > ĊĊĠĠĠ Ġ@ Query (" DELETE Ġfrom Ġsearches ") ĊĠĠĠ Ġfun Ġdelete All () Ċ Ċ }