package Ġcom . su ji . android . su ji _ android . database . dao Ċ Ċ import Ġandroidx . room .* Ċ import Ġcom . su ji . android . su ji _ android . database . model . Sale Ċ import Ġio . reactivex . Flow able Ċ Ċ @ Dao Ċ interface ĠSale DAO Ġ{ ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġsale ") ĊĠĠĠ Ġfun Ġload All Sale (): ĠFlow able < Mutable List < Sale >> ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġsale ĠWHERE Ġsale . is Sale ĠIS Ġ: is Sale ") ĊĠĠĠ Ġfun Ġload Product ( is Sale : ĠBoolean ): ĠFlow able < Mutable List < Sale >> ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġsale ĠWHERE Ġsales Time ĠBETWEEN Ġ: start Ġand Ġ: end ĠAND Ġis Sale ĠIS Ġ 1 ") ĊĠĠĠ Ġfun Ġfind S old Date ( start : ĠLong , Ġend : ĠLong ): ĠFlow able < Mutable List < Sale >> ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġsale ĠWHERE Ġsales Time ĠIS Ġ 1 ĠBETWEEN Ġ: start Ġand Ġ: end ĠAnd Ġis Sale ĠIS Ġ 1 ") ĊĠĠĠ Ġfun Ġdelete S old Date ( start : ĠLong , Ġend : ĠLong ) ĊĊĠĠĠ Ġ@ Insert ĊĠĠĠ Ġfun Ġinsert ( sale : ĠSale ) ĊĊĠĠĠ Ġ@ Delete ĊĠĠĠ Ġfun Ġdelete ( sale : ĠSale ) ĊĊĠĠĠ Ġ@ Update ĊĠĠĠ Ġfun Ġupdate ( sale : ĠSale ) Ċ }