Commit graph

154 commits

Author SHA1 Message Date
Fumiaki Kinoshita
90afe88784 Support SCRAM-SHA-256 2023-04-18 11:16:23 +09:00
Fumiaki Kinoshita
46cfe5bf9a Get rid of MonadFail constraints in Database.MongoDB.Query 2023-01-12 14:25:48 +09:00
kfiz
780df80cfc
Make current driver compatible with the OP_MSG protocol (#137)
* Make current driver compatible with the OP_MSG protocol

Starting with mongodb v6 the OP_MSG protocol is the only accepted message protocol that is accepted by mongodb.
All prior protocols are deprecated. This commit implements the protocol keeping the current client facing API intact.

See:
https://github.com/mongodb/specifications/blob/master/source/message/OP_MSG.rst
https://medium.com/@asayechemeda/communicating-with-mongodb-using-tcp-sockets-521490f981f

Co-authored-by: Doro Rose <doroerose@gmail.com>
2022-10-26 21:09:24 -07:00
why-not-try-calmer
727bdef020 Cleaning, updating codebase to avoid warnings/infos
Updating to avoid deprecated Producer/Consumer from `conduit`.
Removed unused imports.
Removing superfluous brackets.
Simplifying a few function bodies with catMaybe, fromMaybe, mapMaybe.
2022-06-18 13:33:55 +02:00
Andrea Condoluci
9a048f2f85 Add allowDiskUse option for aggregates
Aggregation pipeline stages have a limit of 100Mb of RAM.
In case of large datasets, one can cross that limit by setting
allowDiskUse = True and making stages write data
to temporary files.

See also https://docs.mongodb.com/manual/reference/method/db.collection.aggregate .
2020-12-15 14:47:00 +00:00
Diego Balseiro
951109c91d Use QueryFailure instead of adding a new error to make the change backwards compatible 2020-08-11 16:46:28 -05:00
Diego Balseiro
c6a9ffcc63 Make findCommand tests run just for MongoDB 3.2 or superior 2020-07-31 13:50:33 -05:00
Diego Balseiro
a3e1999287 Refactor getCursorFromResponse 2020-07-30 13:25:19 -05:00
Diego Balseiro
9ad016c043 Add find using the runCommand operation 2020-07-29 00:19:09 -05:00
Victor Denisov
e98655a907 Fix error reporting for deletion of big messages
PR#115
2020-04-07 20:26:59 -07:00
Andrea Condoluci
9ce116b4bc Update Query.hs 2020-04-03 15:36:55 +02:00
Andrea Condoluci
55ca81a474 Undo some inessential changes 2020-04-01 16:53:37 +02:00
Andrea Condoluci
9f41f36d02 Fix famUpdate doc 2020-04-01 16:01:59 +02:00
Andrea Condoluci
b42710839a Improve documentation 2020-04-01 15:11:17 +02:00
Taylor Fausak
917fa0eb57 Use MonadFail instead of Monad 2019-10-04 12:10:24 -04:00
Scott Fleischman
c03e1ed746 Use Control.Monad.Except instead of Control.Monad.Error.
Due to the following warning:
"Module ‘Control.Monad.Error’ is deprecated:
  Use "Control.Monad.Except" instead"
2019-05-29 16:57:51 -07:00
jaccokrijnen
12ab2aef66
Update Query.hs
Fix url to mongo documentation on update modifiers.
2018-10-31 15:03:23 +01:00
James Brechtel
87ddf52c97 Stop leaking Nonce generator on authentication 2018-03-12 16:15:56 -04:00
Victor Denisov
a985209714 Add aggregate that returns Cursor
- also add config to the new aggregate that is extensible in a backward
compatible manner.
2018-02-08 22:18:58 -08:00
Fábián Tamás László
5527036d6c
Remove offending putStrLn-s
The two removed lines littered the terminal.
2017-12-27 11:49:08 +01:00
Victor Denisov
dda10d461b Rework WriteResult for updateMany, deleteMany functions
Merge branch 'update-result'

PR #77

Conflicts:
	CHANGELOG.md
	Database/MongoDB/Query.hs
2017-05-29 19:37:21 -07:00
Victor Denisov
a1e19379f6 Add test and fix for updateMany nMatched and nModified 2017-05-29 12:58:39 -07:00
Victor Denisov
50b7fef240 Fix delete count 2017-05-28 12:58:29 -07:00
Victor Denisov
2984a9b57a Rewrite function in a shorter way 2017-05-21 00:32:13 -07:00
Victor Denisov
161ca964cb Fix wording in docs 2017-05-21 00:31:49 -07:00
Victor Denisov
a1568d9dbf Add mkWeakMVar for Action monad 2017-05-08 23:12:26 -07:00
Victor Denisov
dd6c5057f5 Add modifyMVar for Action monad 2017-05-08 22:48:13 -07:00
Victor Denisov
d963d89c0b Fix documentation for access function 2017-05-06 23:55:27 -07:00
Victor Denisov
4855793dd7 Rewrite updateBlock 2017-05-01 21:47:40 -07:00
Victor Denisov
1d6d6ca9c0 Rewrite deleteBlock 2017-04-09 22:23:34 -07:00
Victor Denisov
d6419daa50 Move WriteConcernError to Failure 2017-04-09 20:43:55 -07:00
Victor Denisov
2a5bfa44e2 Handle unknown documents in insertMany reply 2017-04-09 20:43:55 -07:00
Victor Denisov
48d8dba4e1 Add compound failure 2017-04-09 20:43:55 -07:00
Victor Denisov
7ae65ce487 Assign ids before insert block 2017-04-09 20:43:55 -07:00
Victor Denisov
b6078cc19d Wrap lines 2017-04-09 20:43:54 -07:00
Victor Denisov
173e90eb90 Don't run ...Many tests against mongo 2.4 2017-04-09 20:43:54 -07:00
Victor Denisov
e2e9f12af8 Adjust index for updateBlock results 2017-04-09 20:43:54 -07:00
Victor Denisov
f57ac94a3b Drop support of mongo 2.6 in updateMany and deleteMany 2017-04-09 20:43:54 -07:00
Victor Denisov
dad19515de Keep old behavior of delete command 2017-04-09 20:43:54 -07:00
Victor Denisov
d1d5f84b22 Keep old behavior of update 2017-04-09 20:43:54 -07:00
Victor Denisov
6a13bde01b Set proper index for exception 2017-04-09 20:43:54 -07:00
Victor Denisov
6013272c5d Rewrite delete comand using interruptible for 2017-04-09 20:43:54 -07:00
Victor Denisov
8db991bb5d Rewrite deleteBlock using WriteResult 2017-04-09 20:43:54 -07:00
Victor Denisov
09c05d4b69 Rename UpdateResult to WriteResult
Many fields of DeleteResult overlap with UpdateResult.
It's better to have only one result for all results, just
like it's done in c mongodb driver.
2017-04-09 20:43:54 -07:00
Victor Denisov
569d8ccc08 Fix list append complexity issue 2017-04-09 20:43:54 -07:00
Victor Denisov
eeb0c7981d Edit comments slightly 2017-04-09 20:43:54 -07:00
Victor Denisov
80ebc6f756 Throw exception when insertAll encounters big doc
- insertAll should throw an exception if it encounters a document
too big for one message. However all other documents will be inserted.

- slightly edit docs
2017-04-09 20:43:54 -07:00
Victor Denisov
bedaa744ba Add indexes to error reporting 2017-04-09 20:43:54 -07:00
Victor Denisov
86f782db72 Insert remaining values in insertAll and then throw exception 2017-04-09 20:43:54 -07:00
Victor Denisov
139a17248f Fix tests 2017-04-09 20:43:54 -07:00