package Ġcom . wo ow r ale . open library . data . local . database Ċ Ċ import Ġandroidx . room .* Ċ import Ġcom . wo ow r ale . open library . data . local . model . Book Entity Ċ import Ġcom . wo ow r ale . open library . data . local . model . Seed Entity Ċ Ċ @ Dao Ċ interface ĠOpen Library Dao Ġ{ ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . IGNORE ) ĊĠĠĠ Ġfun Ġinsert Book ( book Entity : ĠBook Entity ): ĠLong ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġbooks ĠWHERE Ġbib Key Ġ= Ġ: id ") ĊĠĠĠ Ġfun Ġfind Book ById ( id : ĠString ): ĠList < Book Entity > ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġbooks ĠWHERE Ġbib Key Ġ= Ġ: id ") ĊĠĠĠ Ġfun Ġdelete Book ( id : ĠString ): ĠInt ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . IGNORE ) ĊĠĠĠ Ġfun Ġinsert Seed ( seed Entity : ĠSeed Entity ): ĠLong ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġseeds ĠWHERE Ġol id Ġ= Ġ: id ") ĊĠĠĠ Ġfun Ġdelete Seed ( id : ĠString ): ĠInt ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġseeds ") ĊĠĠĠ Ġfun ĠgetAll Seed s (): ĠList < Seed Entity > ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġseeds ĠWHERE Ġol id Ġ= Ġ: id ") ĊĠĠĠ Ġfun Ġfind Seed ById ( id : ĠString ): ĠList < Seed Entity > Ċ Ċ }