Skip to content

Commit

Permalink
Refactor: use textArray helper
Browse files Browse the repository at this point in the history
  • Loading branch information
bryophyta committed Feb 24, 2025
1 parent 9fa3b24 commit 3497837
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions newswires/app/db/FingerpostWireEntry.scala
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ object FingerpostWireEntry
case Nil => None
case categoryCodes =>
Some(
sqls"${syn.categoryCodes} && array[${categoryCodes.map(code => sqls"$code")}]::text[]"
sqls"${syn.categoryCodes} && ${textArray(categoryCodes)}"
)
}

Expand All @@ -271,7 +271,7 @@ object FingerpostWireEntry
case categoryCodesExcl =>
val cce = this.syntax("categoryCodesExcl")
val doesContainCategoryCodes =
sqls"${cce.categoryCodes} && array[${categoryCodesExcl.map(code => sqls"$code")}]::text[]"
sqls"${cce.categoryCodes} && ${textArray(categoryCodesExcl)}"

Some(
sqls"""|NOT EXISTS (
Expand Down

0 comments on commit 3497837

Please sign in to comment.