Skip to content

Commit

Permalink
Merge pull request #63 from hmrc/TAV-519E
Browse files Browse the repository at this point in the history
TAV-519: Use synthetic id
  • Loading branch information
Ardesco authored May 9, 2022
2 parents b31b19a + 6f4350d commit 74224cc
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion app/repositories/CSV.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ object CSV {
throw new RuntimeException("Incorrect input line: " + line.mkString)
} else {
val country = line(9)
val id: Option[String] = line(0).emptyToNone.map(h => s"${country.toUpperCase}$h")
val id: Option[String] = line(0).emptyToNone
val number: Option[String] = line(1).emptyToNone
val street: Option[String] = line(2).emptyToNone
val unit: Option[String] = line(3).emptyToNone
Expand Down
2 changes: 1 addition & 1 deletion app/repositories/PostgresNonABPAddressRepository.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PostgresNonABPAddressRepository @Inject()(transactor: Transactor[IO], quer

val querySql = csql(
s"""
|SELECT CONCAT('${countryCode.toUpperCase}', hash), number, street, unit, city, district, region, postcode
|SELECT cip_id, number, street, unit, city, district, region, postcode
| FROM $countryCode
| WHERE address_lookup_ft_col @@ plainto_tsquery('english', '$filter')
| LIMIT ${queryConfig.queryResultsLimit};""".stripMargin)
Expand Down
60 changes: 30 additions & 30 deletions conf/data/nonuk-testaddresses.csv
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
a7c8e8dae450ecb9,1,Abri Lane,"","",Pembroke,"",HM02,11781,bm
def91be0039f9abd,15,Allspice Gardens,"","",Warwick,"",WK04,32714,bm
5a0ef2c22c212b9b,4,Addendum Lane South,"","",Pembroke,"",HM07,31072,bm
84c741111844f6bb,5,Addendum Lane,"","",Pembroke,"",HM07,31255,bm
d32294659582547b,9,Addendum Lane,"","",Pembroke,"",HM07,7791,bm
7fd846689867c00a,11,Abri Lane,"","",Pembroke,"",HM02,13731,bm
b84e7ad68021a366,10,Arlington Avenue,"","",Pembroke,"",HM02,9260,bm
e3d07e894591cf6b,1,Bakery Lane,"","",Pembroke,"",HM07,13969,bm
429a38eeecda9701,5,Abri Lane,"","",Pembroke,"",HM02,15989,bm
44d824b5744c5411,11,Addendum Lane,"","",Pembroke,"",HM07,9619,bm
0ae9f3dd48137f5a,3,Abri Lane,"","",Pembroke,"",HM02,15059,bm
c7b629ff5ba80672,13,Addendum Lane,"","",Pembroke,"",HM07,7916,bm
2a7b04c31168e9c4,6,Addendum Lane South,"","",Pembroke,"",HM07,31073,bm
1fb321218785e9a6,12,Arlington Avenue,"","",Pembroke,"",HM02,9259,bm
e9af5f86b43dbd6c,6,Bakery Lane,"","",Pembroke,"",HM07,9153,bm
6770e8fc701c0a1e,11,Allspice Gardens,"","",Warwick,"",WK03,32712,bm
9103881c8857f8f9,13,Allspice Gardens,"","",Warwick,"",WK03,32713,bm
cd55f5a31097ebb2,17,Allspice Gardens,"","",Warwick,"",WK03,32715,bm
c50ef99a9f966c60,5,Addendum Lane,"","",Pembroke,"",HM07,32662,bm
43eb7d6f6d8061d0,14,Bayfield Road,"","",Warwick,"",WK04,12256,bm
dca131973cf0ee6b,14,Ardsheal Drive,"","",Paget,"",PG06,31460,bm
30eca3ab4d77ab05,3,Addendum Lane South,"","",Pembroke,"",HM07,31074,bm
7f1a7bffffe2f7b3,10,Agar's Hill,"","",Pembroke,"",HM05,30785,bm
394d8f4ee0106672,4,Addendum Lane,"","",Pembroke,"",HM07,16167,bm
394d8f4ee0106673,11,Agar's Island,"","",Pembroke,"",HM05,,bm
beb593df255c8c24,1,Agar's Island,"","",Pembroke,"",HM05,16349,bm
ddf163b8b65404b2,9,Agar's Island,"","",Pembroke,"",HM05,9463,bm
ba9e42e04bbd5450,5,Agar's Island,"","",Pembroke,"",HM05,9462,bm
5682c49929d35ff3,3,Agar's Island,"","",Pembroke,"",HM05,9454,bm
0cac38c433c8b06c,7,Agar's Island,"","",Pembroke,"",HM05,2649,bm
BMa7c8e8dae450ecb9,1,Abri Lane,"","",Pembroke,"",HM02,11781,bm
BMdef91be0039f9abd,15,Allspice Gardens,"","",Warwick,"",WK04,32714,bm
BM5a0ef2c22c212b9b,4,Addendum Lane South,"","",Pembroke,"",HM07,31072,bm
BM84c741111844f6bb,5,Addendum Lane,"","",Pembroke,"",HM07,31255,bm
BMd32294659582547b,9,Addendum Lane,"","",Pembroke,"",HM07,7791,bm
BM7fd846689867c00a,11,Abri Lane,"","",Pembroke,"",HM02,13731,bm
BMb84e7ad68021a366,10,Arlington Avenue,"","",Pembroke,"",HM02,9260,bm
BMe3d07e894591cf6b,1,Bakery Lane,"","",Pembroke,"",HM07,13969,bm
BM429a38eeecda9701,5,Abri Lane,"","",Pembroke,"",HM02,15989,bm
BM44d824b5744c5411,11,Addendum Lane,"","",Pembroke,"",HM07,9619,bm
BM0ae9f3dd48137f5a,3,Abri Lane,"","",Pembroke,"",HM02,15059,bm
BMc7b629ff5ba80672,13,Addendum Lane,"","",Pembroke,"",HM07,7916,bm
BM2a7b04c31168e9c4,6,Addendum Lane South,"","",Pembroke,"",HM07,31073,bm
BM1fb321218785e9a6,12,Arlington Avenue,"","",Pembroke,"",HM02,9259,bm
BMe9af5f86b43dbd6c,6,Bakery Lane,"","",Pembroke,"",HM07,9153,bm
BM6770e8fc701c0a1e,11,Allspice Gardens,"","",Warwick,"",WK03,32712,bm
BM9103881c8857f8f9,13,Allspice Gardens,"","",Warwick,"",WK03,32713,bm
BMcd55f5a31097ebb2,17,Allspice Gardens,"","",Warwick,"",WK03,32715,bm
BMc50ef99a9f966c60,5,Addendum Lane,"","",Pembroke,"",HM07,32662,bm
BM43eb7d6f6d8061d0,14,Bayfield Road,"","",Warwick,"",WK04,12256,bm
BMdca131973cf0ee6b,14,Ardsheal Drive,"","",Paget,"",PG06,31460,bm
BM30eca3ab4d77ab05,3,Addendum Lane South,"","",Pembroke,"",HM07,31074,bm
BM7f1a7bffffe2f7b3,10,Agar's Hill,"","",Pembroke,"",HM05,30785,bm
BM394d8f4ee0106672,4,Addendum Lane,"","",Pembroke,"",HM07,16167,bm
BM394d8f4ee0106673,11,Agar's Island,"","",Pembroke,"",HM05,,bm
BMbeb593df255c8c24,1,Agar's Island,"","",Pembroke,"",HM05,16349,bm
BMddf163b8b65404b2,9,Agar's Island,"","",Pembroke,"",HM05,9463,bm
BMba9e42e04bbd5450,5,Agar's Island,"","",Pembroke,"",HM05,9462,bm
BM5682c49929d35ff3,3,Agar's Island,"","",Pembroke,"",HM05,9454,bm
BM0cac38c433c8b06c,7,Agar's Island,"","",Pembroke,"",HM05,2649,bm

0 comments on commit 74224cc

Please sign in to comment.