package Ġco . nil in . op ex . bc gateway . ports . postgres . dao Ċ Ċ import Ġco . nil in . op ex . bc gateway . ports . postgres . model . Address Type Model Ċ import Ġco . nil in . op ex . bc gateway . ports . postgres . model . Chain Endpoint Model Ċ import Ġco . nil in . op ex . bc gateway . ports . postgres . model . Chain Model Ċ import Ġkotlinx . coroutines . flow . Flow Ċ import Ġorg . springframework . data . r 2 dbc . repository . Query Ċ import Ġorg . springframework . data . repository . reactive . Reactive Crud Repository Ċ import Ġorg . springframework . stereotype . Repository Ċ import Ġreactor . core . publisher . Mono Ċ Ċ @ Repository Ċ interface ĠChain Repository Ġ: ĠReactive Crud Repository < Chain Model , ĠString > Ġ{ ĊĠĠĠ Ġfun Ġfind ByName ( name : ĠString ): ĠMono < Chain Model > ĊĊĠĠĠ Ġ@ Query ( ĊĠĠĠĠĠĠĠ Ġ""" ĊĠĠĠĠĠĠĠĠĠĠĠ Ġselect Ġaddress _ types . id , Ġchain _ address _ types . chain _ name , Ġaddress _ types . address _ type , Ġaddress _ types . address _ regex , Ġaddress _ types . memo _ regex ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfrom Ġchain _ address _ types ĊĠĠĠĠĠĠĠĠĠĠĠ Ġjoin Ġaddress _ types ĊĠĠĠĠĠĠĠĠĠĠĠ Ġon Ġaddress _ types . id Ġ= Ġchain _ address _ types . addr _ type _ id ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwhere Ġchain _ name Ġ= Ġ: name ĊĠĠĠĠĠĠĠ Ġ""" ĊĠĠĠ Ġ) ĊĠĠĠ Ġfun Ġfind Address Types ByName ( name : ĠString ): ĠFlow < Address Type Model > ĊĊĠĠĠ Ġ@ Query (" select Ġ* Ġfrom Ġchain _ endpoints Ġwhere Ġchain _ name Ġ= Ġ: name ") ĊĠĠĠ Ġfun Ġfind Endpoints ByName ( name : ĠString ): ĠFlow < Chain Endpoint Model > Ċ } Ċ