From 34978376547106e03396b1976d1aa7225a17164f Mon Sep 17 00:00:00 2001 From: Pete F Date: Mon, 24 Feb 2025 14:21:38 +0000 Subject: [PATCH] Refactor: use textArray helper --- newswires/app/db/FingerpostWireEntry.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newswires/app/db/FingerpostWireEntry.scala b/newswires/app/db/FingerpostWireEntry.scala index d405a17..df63966 100644 --- a/newswires/app/db/FingerpostWireEntry.scala +++ b/newswires/app/db/FingerpostWireEntry.scala @@ -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)}" ) } @@ -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 (