package Ġg q . kir man ak . meal ient . data . recipes . db Ċ Ċ import Ġandroidx . paging . Paging Source Ċ import Ġandroidx . room .* Ċ import Ġg q . kir man ak . meal ient . data . recipes . db . entity .* Ċ import Ġg q . kir man ak . meal ient . data . recipes . impl . Full Recipe Info Ċ Ċ @ Dao Ċ interface ĠRecipe Dao Ġ{ ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġtags ") ĊĠĠĠ Ġsuspend Ġfun Ġquery All Tags (): ĠList < Tag Entity > ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġcategories ") ĊĠĠĠ Ġsuspend Ġfun Ġquery All Categories (): ĠList < Category Entity > ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġrecipe _ sum maries ĠORDER ĠBY Ġdate _ added ĠDESC ") ĊĠĠĠ Ġfun Ġquery Recipes By Pages (): ĠP aging Source < Int , ĠRecipe Summary Entity > ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert Recipe ( recipe Summary Entity : ĠRecipe Summary Entity ) ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . IGNORE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert Tag ( tag Entity : ĠTag Entity ): ĠLong ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . IGNORE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert Tag Recipe Entity ( tag Recipe Entity : ĠTag Recipe Entity ) ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . IGNORE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert Category ( category Entity : ĠCategory Entity ): ĠLong ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . IGNORE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert Category Recipe Entity ( category Recipe Entity : ĠCategory Recipe Entity ) ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . IGNORE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert Tag Recipe Entities ( tag Recipe Entities : ĠSet < Tag Recipe Entity >) ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . IGNORE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert Category Recipe Entities ( category Recipe Entities : ĠSet < Category Recipe Entity >) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġrecipe _ sum maries ") ĊĠĠĠ Ġsuspend Ġfun Ġremove All Recipes () ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġtags ") ĊĠĠĠ Ġsuspend Ġfun Ġremove All Tags () ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġcategories ") ĊĠĠĠ Ġsuspend Ġfun Ġremove All Categories () ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġrecipe _ sum maries ĠORDER ĠBY Ġdate _ updated ĠDESC ") ĊĠĠĠ Ġsuspend Ġfun Ġquery All Recipes (): ĠList < Recipe Summary Entity > ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġcategory _ recipe ") ĊĠĠĠ Ġsuspend Ġfun Ġquery All Category Recipes (): ĠList < Category Recipe Entity > ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġtag _ recipe ") ĊĠĠĠ Ġsuspend Ġfun Ġquery All Tag Recipes (): ĠList < Tag Recipe Entity > ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert Recipe ( recipe : ĠRecipe Entity ) ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert Recipe Instructions ( instructions : ĠList < Recipe Instruction Entity >) ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert Recipe Ing redients ( ingredients : ĠList < Recipe Ingredient Entity >) ĊĊĠĠĠ Ġ@ Transaction ĊĠĠĠ Ġ@ SuppressWarnings ( Room Warnings . CURSOR _ MIS MATCH ) Ġ// ĠThe Ġlint Ġis Ġwrong , Ġthe Ġcolumns Ġare Ġactually Ġused ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġrecipe ĠJOIN Ġrecipe _ sum maries ĠON Ġrecipe . remote _ id Ġ= Ġrecipe _ sum maries . remote _ id ĠJOIN Ġrecipe _ ingredient ĠON Ġrecipe _ ingredient . recipe _ id Ġ= Ġrecipe . remote _ id ĠJOIN Ġrecipe _ instruction ĠON Ġrecipe _ instruction . recipe _ id Ġ= Ġrecipe . remote _ id ĠWHERE Ġrecipe . remote _ id Ġ= Ġ: recipe Id ") ĊĠĠĠ Ġsuspend Ġfun Ġquery Full Recipe Info ( recipe Id : ĠLong ): ĠFull Recipe Info ? ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġrecipe _ ingredient ĠWHERE Ġrecipe _ id Ġ= Ġ: recipe Id ") ĊĠĠĠ Ġsuspend Ġfun Ġdelete Recipe Ing redients ( recipe Id : ĠLong ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġrecipe _ instruction ĠWHERE Ġrecipe _ id Ġ= Ġ: recipe Id ") ĊĠĠĠ Ġsuspend Ġfun Ġdelete Recipe Instructions ( recipe Id : ĠLong ) Ċ }