Revert bulk update patch

- Revert patch #2311
- Keep the refactor done to qsFiltersRoot
- Keep the refactor done to the items tables
- Add tests that now work with pg-safeupdate as a result
This commit is contained in:
Laurence Isla
2022-08-12 10:00:33 -05:00
committed by GitHub
parent 4ac47df528
commit 7de8d5446a
12 changed files with 161 additions and 282 deletions
+2 -6
View File
@@ -360,12 +360,8 @@ handleCreate identifier@QualifiedIdentifier{..} context@RequestContext{..} = do
pure $ Wai.responseLBS HTTP.status200 (contentTypeHeaders context) $ LBS.fromStrict plan
handleUpdate :: QualifiedIdentifier -> RequestContext -> DbHandler Wai.Response
handleUpdate identifier context@RequestContext{..} = do
let
ApiRequest{..} = ctxApiRequest
pkCols = maybe mempty tablePKCols $ HM.lookup identifier $ dbTables ctxDbStructure
resultSet <- writeQuery MutationUpdate identifier False pkCols context
handleUpdate identifier context@(RequestContext _ _ ApiRequest{..} _) = do
resultSet <- writeQuery MutationUpdate identifier False mempty context
case resultSet of
RSStandard{..} -> do