package Ġbr . com . luc as cor de iro . poke dex . data . database . dao Ċ Ċ import Ġandroidx . room .* Ċ import Ġbr . com . luc as cor de iro . poke dex . data . database . entity . Pokemon Cross Type Entity Ċ import Ġbr . com . luc as cor de iro . poke dex . data . database . entity . Pokemon Entity Ċ import Ġkotlinx . coroutines . flow . Flow Ċ Ċ @ Dao Ċ interface ĠPokemon Dao Ġ{ ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġpokemon ĠORDER ĠBY Ġpokemon Id ĠLIMIT Ġ: limit ĠOFFSET Ġ: offset ") ĊĠĠĠ Ġfun ĠgetAll ( limit : ĠLong , Ġoffset : ĠLong ): ĠFlow < List < Pokemon Entity >> ĊĊĠĠĠ Ġ@ Query (" SELECT Ġpokemon Id ĠFROM Ġpokemon ĠORDER ĠBY Ġpokemon Id ĠLIMIT Ġ: limit ĠOFFSET Ġ: offset ") ĊĠĠĠ Ġfun ĠgetAll Ids ( limit : ĠLong , Ġoffset : ĠLong ): ĠFlow < List < Long >> ĊĊĠĠĠ Ġ@ Query (" UPDATE Ġpokemon ĠSET Ġis Like Ġ= Ġ: like ĠWHERE Ġpokemon Id Ġ= Ġ: pokemon Id ") ĊĠĠĠ Ġsuspend Ġfun Ġupdate Like By Pokemon Id ( pokemon Id : ĠLong , Ġlike : ĠBoolean ) ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġpokemon ĠWHERE Ġpokemon Id Ġ= Ġ: pokemon Id ") ĊĠĠĠ Ġfun Ġget ById ( pokemon Id : ĠLong ): ĠFlow < Pokemon Entity ?> ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġpokemon ĠWHERE Ġname ĠLIKE Ġ: name Query ĠORDER ĠBY Ġpokemon Id ĠLIMIT Ġ: limit ") ĊĠĠĠ Ġfun Ġquery ByName ( name Query : ĠString , Ġlimit : ĠLong , ): ĠFlow < List < Pokemon Entity >> ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġinsert All ( list : ĠList < Pokemon Entity >) ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . IGNORE ) ĊĠĠĠ Ġfun Ġinsert ( join : ĠPokemon Cross Type Entity ) ĊĊĠĠĠ Ġ@ Query (" SELECT ĠCOUNT (*) ĠFROM Ġpokemon ") ĊĠĠĠ Ġsuspend Ġfun Ġcount (): ĠLong ĊĊĠĠĠ Ġ@ Transaction ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġpokemon cros stype entity ĠWHERE Ġpokemon Id Ġ= Ġ: pokemon Id ") ĊĠĠĠ Ġsuspend Ġfun Ġget Pokemon WithType Entity ( pokemon Id : ĠLong ): ĠList < Pokemon Cross Type Entity > Ċ } Ċ