Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions persistent-postgresql/Database/Persist/Postgresql.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ excludeNotEqualToOriginal field =
-- Called thusly, this method will insert a new record (if none exists) OR update a recordField with a new value
-- assuming the condition in the last block is met.
--
-- -- @since 2.12.1.0
-- @since 2.12.1.0
upsertManyWhere ::
forall record backend m.
( backend ~ PersistEntityBackend record,
Expand All @@ -1874,14 +1874,10 @@ upsertManyWhere ::
PersistEntity record,
MonadIO m
) =>
-- | A list of the records you want to insert, or update
[record] ->
-- | A list of the fields you want to copy over.
[HandleUpdateCollision record] ->
-- | A list of the updates to apply that aren't dependent on the record being inserted.
[Update record] ->
-- | A filter condition that dictates the scope of the updates
[Filter record] ->
[record] -> -- ^ A list of the records you want to insert, or update
[HandleUpdateCollision record] -> -- ^ A list of the fields you want to copy over.
[Update record] -> -- ^ A list of the updates to apply that aren't dependent on the record being inserted.
[Filter record] -> -- ^ A filter condition that dictates the scope of the updates
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That really fixes it? I'm surprised. Do you have a screenshot of before and after?

ReaderT backend m ()
upsertManyWhere [] _ _ _ = return ()
upsertManyWhere records fieldValues updates filters = do
Expand Down