From 30a18d0e579035f781dabeee1d745f86c6d1b9a4 Mon Sep 17 00:00:00 2001 From: Mona Mayrhofer Date: Mon, 18 Mar 2024 11:07:03 +0100 Subject: [PATCH] Update Comment --- IHP/QueryBuilder.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/IHP/QueryBuilder.hs b/IHP/QueryBuilder.hs index d2f6edacf..6161ff0a9 100644 --- a/IHP/QueryBuilder.hs +++ b/IHP/QueryBuilder.hs @@ -833,9 +833,7 @@ filterWhereCaseInsensitive (name, value) queryBuilderProvider = injectQueryBuild filterWhereIdIn :: forall table model queryBuilderProvider (joinRegister :: *). (KnownSymbol table, Table model, model ~ GetModelByTableName table, HasQueryBuilder queryBuilderProvider joinRegister) => [Id model] -> queryBuilderProvider table -> queryBuilderProvider table filterWhereIdIn values queryBuilderProvider = - -- TODO Null values are ignored here for now, because they need special treatment as in sql they must be compared using "IS NULL"... - -- We would a) need to know somehow which values are null (which is not possible with primaryKeyConditionForId returning opaque Actions) - -- and b) then decompose the values into something like: (col_a IS NULL AND (col_b, col_c) IN ?) OR (col_b IS NULL AND (col_a, col_c) IN ?) + -- We don't need to treat null values differently here, because primary keys imply not-null let qualifyColumnName col = tableNameByteString @model <> "." <> col