Skip to content

Commit

Permalink
Update Comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MonaMayrhofer committed Mar 18, 2024
1 parent dbdd70d commit 30a18d0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions IHP/QueryBuilder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 30a18d0

Please sign in to comment.