Commit graph

97 commits

Author SHA1 Message Date
Victor Denisov
f81d5ec42e Handle exceptions in updateBlock 2017-04-09 20:43:54 -07:00
Victor Denisov
692cdb94c7 Mark update command as failed if there are write concern errors 2017-04-09 20:43:54 -07:00
Victor Denisov
6fe3cd982d Fix unit tests
updateMany and updateAll don't throw exceptions.
They return UpdateResult which reports errors.
2017-04-09 20:43:54 -07:00
Victor Denisov
1898928cf0 Calculate filed total of update command 2017-04-09 20:43:54 -07:00
Victor Denisov
da0441d454 Process legacy command as in mongoc 2017-04-09 20:43:54 -07:00
Victor Denisov
29286fa2e0 Implement more careful processing of error codes 2017-04-09 20:43:54 -07:00
Victor Denisov
74e8aa205d Keep write concern errors in list 2017-04-09 20:43:54 -07:00
Victor Denisov
b6fa6ea402 Add WriteConcernError to UpdateResult 2017-04-09 20:43:54 -07:00
Victor Denisov
10675a0673 Report errors in UpdateResult instead of Exceptions 2017-04-09 20:43:54 -07:00
Victor Denisov
5254793767 Throw exceptions in case of single document updates 2017-04-09 20:43:54 -07:00
Victor Denisov
5812753217 Add more documentation 2017-04-09 20:43:54 -07:00
Victor Denisov
399e2c3443 Return update result for old versions of mongodb 2017-04-09 20:43:54 -07:00
Victor Denisov
482fb570c3 Drop MonadBaseControl requirement 2016-08-06 15:17:03 -07:00
Victor Denisov
b9be757039 Restrict type of write function 2016-08-06 13:28:36 -07:00
Victor Denisov
8348045cc5 Inline send function 2016-08-05 20:29:20 -07:00
Victor Denisov
b34162f084 Put request function out of Action monad 2016-08-04 22:58:25 -07:00
Victor Denisov
419b3c19fb Inline call function 2016-08-04 22:23:30 -07:00
Victor Denisov
d40d87500f
Fix warning in authSCRAM 2016-06-19 20:49:56 -07:00
Victor Denisov
f3e1f3b42d
Put new functions into proper sections 2016-06-19 20:49:44 -07:00
Victor Denisov
0ceefaec73 Implement bulk delete operation 2016-06-19 17:18:35 -07:00
Victor Denisov
15ba90784e Fix bulk update documentation 2016-06-19 17:03:58 -07:00
Victor Denisov
18ed370b90 Implement write concern for new version of insert 2016-06-18 22:30:32 -07:00
Victor Denisov
8091afe4a0 Hide Internal module 2016-06-16 11:27:03 -07:00
Victor Denisov
97400c074d Implement bulk update operation 2016-06-14 00:37:43 -07:00
Victor Denisov
ff0962b1d3 Remove debug output 2016-06-06 22:44:12 -07:00
Victor Denisov
3a4ebcb23b Insert the list of documents into chunks 2016-05-29 23:14:04 -07:00
Victor Denisov
a632e8ff55 Collect size restrictions from the server 2016-05-26 23:03:55 -07:00
Victor Denisov
d123460b40 Implement insert using command mechanism 2016-05-25 00:12:32 -07:00
Victor Denisov
5b97fb4ade Use listCollections command if protocol version is > 2 2016-05-21 13:32:04 -07:00
Victor Denisov
2ba71ca277 Retrieve server data on connection 2016-05-21 13:32:04 -07:00
Yuras Shumovich
0b4e3d96ed Support mongolab SCRAM auth
For some reason mongolab requires additional message exchange round.
2015-11-30 15:55:20 +03:00
Victor Denisov
8af6a82ec8 Clean trailing whitespaces 2015-11-07 10:37:40 -08:00
Ralph Morton
6f5f76afbb Add support for SCRAM-SHA-1 authentication 2015-11-01 18:05:39 +02:00
Victor Denisov
75470af421 Retrieve another batch for next in case of unlimited request 2015-09-29 22:42:22 -07:00
Victor Denisov
dca5ae051a Apply reviewer's comments 2015-07-31 03:25:01 -07:00
Victor Denisov
5e72c8ad61 Handle the case when mongodb returns less documents than cursor requested
If we request certain amount of values from a cursor the mongo db server can
return less than requested. So, if we provide -100000 then mongodb may
return 97899 and close the cursor.

Instead of relying on negative values this implementation will use only
positive numbers and will close the cursor itself as soon as the driver
receives enough results.

It fixes the issue #24 from github.
2015-06-19 18:23:44 -07:00
Greg Weber
15b14c0acb Merge pull request #21 from mschristiansen/patch-2
Remove Control.Applicative imports and tab character
2015-05-16 11:40:11 -05:00
Mikkel Christiansen
f69440d7fa Remove applicative import warnings in GHC 7.10.1. 2015-05-15 15:26:34 +02:00
Mikkel Christiansen
6d877b4da2 Change all instances of myPipe, etc. to mongoPipe, etc. 2015-05-15 09:58:25 +02:00
Mikkel Christiansen
78c0619e02 Export MongoContext constructor
I have a reader monad with app configuration that I would like to make an instance of HasMongoContext and then need the MongoContext constructor to add a MongoContext to my own reader monad.
2015-05-14 14:53:08 +02:00
Greg Weber
a047c309e5 better findAndModify error handling 2014-07-24 08:12:44 -07:00
Greg Weber
f2a6307530 repsert -> upsert 2014-07-24 08:12:15 -07:00
Greg Weber
d2d4f9534c export defFamUpdateOpts 2014-07-19 19:32:33 -07:00
Greg Weber
9259d392d3 add findAndModifyOpts
supports the full range of optiosn for findAndModify
2014-07-08 12:44:41 -07:00
Fedor Gogolev
5ca3b1c210 Fix merge conflict 2014-04-12 17:17:47 +04:00
Fedor Gogolev
adb57dce72 Merge branch 'pr-20'
Conflicts:
	Database/MongoDB/Query.hs
2014-04-12 17:06:52 +04:00
Sean Leather
61c333eee1 Link 'find' and 'delete' in 'select' documentation 2014-03-09 17:21:30 +02:00
Michael Snoyman
a43c94f977 Remove MonadIO' 2013-12-27 13:39:22 +02:00
Michael Snoyman
3a97c2cbdb Turn Action into a type synonym, not a newtype 2013-12-26 17:32:21 +02:00
Michael Snoyman
ab5fcb1f78 HasMongoContext instead of liftDB 2013-12-26 17:28:44 +02:00