Indent several lines

This commit is contained in:
Victor Denisov 2016-11-19 10:47:47 -08:00
parent af49f43027
commit a828806940

View file

@ -619,7 +619,7 @@ updateMany = update' True
{-| Bulk update operation. If one update fails it will proceed with the {-| Bulk update operation. If one update fails it will proceed with the
- remaining documents. With mongodb server before 2.6 it will send update - remaining documents. With mongodb server before 2.6 it will send update
- requests one by one. In order to receive error messages in versions under - requests one by one. In order to receive error messages in versions under
- 2.6 you need to user confirmed writes. Otherwise even if the errors had - 2.6 you need to use confirmed writes. Otherwise even if the errors had
- place the list of errors will be empty and the result will be success. - place the list of errors will be empty and the result will be success.
- After 2.6 it will use bulk update feature in mongodb. - After 2.6 it will use bulk update feature in mongodb.
-} -}
@ -649,7 +649,11 @@ update' ordered col updateDocs = do
let writeConcern = case mode of let writeConcern = case mode of
NoConfirm -> ["w" =: (0 :: Int)] NoConfirm -> ["w" =: (0 :: Int)]
Confirm params -> params Confirm params -> params
let docSize = sizeOfDocument $ updateCommandDocument col ordered [] writeConcern let docSize = sizeOfDocument $ updateCommandDocument
col
ordered
[]
writeConcern
let preChunks = splitAtLimit let preChunks = splitAtLimit
(maxBsonObjectSize sd - docSize) (maxBsonObjectSize sd - docSize)
-- size of auxiliary part of update -- size of auxiliary part of update
@ -678,7 +682,13 @@ update' ordered col updateDocs = do
let totalWriteConcernErrors = concat $ map writeConcernErrors blocks let totalWriteConcernErrors = concat $ map writeConcernErrors blocks
let upsertedTotal = concat $ map upserted blocks let upsertedTotal = concat $ map upserted blocks
return $ UpdateResult failedTotal updatedTotal modifiedTotal upsertedTotal totalWriteErrors totalWriteConcernErrors return $ UpdateResult
failedTotal
updatedTotal
modifiedTotal
upsertedTotal
totalWriteErrors
totalWriteConcernErrors
`catch` \(e :: Failure) -> return $ UpdateResult True 0 Nothing [] [e] [] `catch` \(e :: Failure) -> return $ UpdateResult True 0 Nothing [] [e] []