Commit graph

598 commits

Author SHA1 Message Date
63bba3a6d3
Merge patch for Mongo 6 2023-08-07 13:18:39 -05:00
0afaf89e1d
Merge branch 'runCommand-compat' of https://github.com/fumieval/mongodb into zgo-patch 2023-08-07 13:18:07 -05:00
22537d87ee
Merge branch 'external' into zgo-patch 2023-07-27 12:47:02 -05:00
cd3977c731
Adjust deps 2023-07-27 12:01:22 -05:00
4a9a1cb63f
Merge branch 'scram-sha-256' of https://github.com/fumieval/mongodb into external 2023-07-27 10:44:45 -05:00
Victor Denisov
35ee53abed Add changelog entry 2023-06-25 14:00:20 -07:00
Victor Denisov
4a46964d4c
Fix issue on collections with '.'
Merge pull request #147 from pierreMizrahi/master
2023-06-25 13:47:58 -07:00
Pierre Mizrahi
51358d13c4 mongo 6: fix issue on collections with '.'
Collection names are allowed to have a '.' in their name, db
names aren't (see
https://www.mongodb.com/docs/manual/reference/limits/#naming-restrictions)

This codes changes the logic to extract the collection
name form a FullConnecton string by stripping until the first
dot, and provides a test case.
2023-05-29 11:48:05 +02:00
Fumiaki Kinoshita
46643fd8ad Make runCommand compatible with MongoDB 6.0 2023-05-02 16:56:38 +09:00
Fumiaki Kinoshita
90afe88784 Support SCRAM-SHA-256 2023-04-18 11:16:23 +09:00
Pierre Mizrahi
995087e9a0 repair single document upserts when using OP_MSG
780df80cfc introduces support for the
OP_MSG protocol. Unfortunately, the upsert and multi options of the
update command still use flagBits to communicate the options, whereas
they must be provided directly into the command document,
alongside the "q" and "v" fields.

This commit:
 - introduces a test for a single-document upsert that, if isolated,
   succeeds against the reference MongoDB 3.6 container, but fails
   against an official 6.0 image.
 - provides a patch that sets the appropriate options.

The test is not perfect as the upsert operation is inherently racy and
this difficult to test. A comfortable threadDelay has been inserted as
a workaround to accomodate for medium workloads.
2023-02-13 14:05:56 +01:00
Victor Denisov
fb0d140aa4 Get rid of MonadFail constraints in MongoDB.Query
PR #141
2023-02-04 21:50:34 -08:00
Victor Denisov
6f1d842641 Add missing dependencies to benchmarks 2023-02-04 21:49:53 -08:00
Fumiaki Kinoshita
46cfe5bf9a Get rid of MonadFail constraints in Database.MongoDB.Query 2023-01-12 14:25:48 +09:00
Victor Denisov
a5a0f3517e Bump version
Update change log
2022-10-26 21:13:29 -07: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
Victor Denisov
80c313362b
Fixed a typo in openReplicatSetSRV' documentation strings.
Merge pull request #134 from why-not-try-calmer/adrien/typo-in-docs
2022-09-18 18:02:35 -07:00
why-not-try-calmer
3c3c2d1f35 Fixed a typo in openReplicatSetSRV' documentation strings. 2022-09-02 10:53:06 +02:00
Victor Denisov
497025bd3c
Clean, update codebase to avoid warnings/infos
Merge pull request #130 from why-not-try-calmer/cleaning-codebase
PR #https://github.com/mongodb-haskell/mongodb/pull/130
2022-07-08 19:46:30 -07:00
Adrien
f66742378d
Merge branch 'master' into cleaning-codebase 2022-06-18 13:37:42 +02: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
Victor Denisov
2ab662b2de
Allow optional TLS params
Merge pull request #129 from darrell-roberts/master

for issue #126.
2022-03-21 21:08:47 -07:00
Darrell Roberts
e3ce8698c7 for issue #126. Allow optional TLS params 2022-03-10 08:33:16 -05:00
Darrell Roberts
408cc267f5 for issue #126. Allow optional TLS params 2022-03-09 09:17:40 -05:00
Victor Denisov
5980bc18b2
Add a clarificatory remark and one example to openReplicaSet'
Merge pull request #127 from why-not-try-calmer/adrien/few-clarifications
2022-02-06 22:27:10 -08:00
why-not-try-calmer
410fdd587a Added "timeouts" as one type of events users should handle as part of their use of Pipeline. 2022-02-03 08:46:16 +01:00
why-not-try-calmer
6ad28bc0a6 Added a clarificatory remark and one example to openReplicaSet'
Some new users might be put off by the lack of a array of choice between connection methods
that this package offers. This remark and the associated examples are a first attempt to make the package easier to start with.
--
2022-01-15 16:20:27 +01:00
Victor Denisov
3bb466c818 Bump version 2021-06-14 20:45:45 -07:00
Victor Denisov
6d338dac69 Minor sample fix of liftIO for GHC >= 8.0
PR https://github.com/mongodb-haskell/mongodb/pull/121
2021-06-13 21:50:50 -07:00
Victor Denisov
82c539bd4a Add changelog entry 2021-05-28 21:48:41 -07:00
Victor Denisov
10d877cfcd Add simple set for BSON to work on ghci but also from scripts
PR#122
2021-05-27 22:05:26 -07:00
Carlos Saltos
1afc7bfab5 Adding simple set for BSON to work on ghci but also from scripts 2021-05-02 01:51:39 +03:00
Carlos Saltos
4d0ccf84ef Minor sample fix of LiftIO for GHC >= 8.0 2021-05-02 01:45:35 +03:00
Victor Denisov
952aed5a1f
Add allowDiskUse option for aggregates
Merge pull request #120 from acondolu/allow-disk-use
2021-01-03 20:53:11 -08: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
Victor Denisov
a9e1868d10 Bump version 2020-08-17 20:36:29 -07:00
Victor Denisov
c9c9506c45
Add findCommand function
`findCommand` uses command unlike `find` function that uses the wire protocol

Merge pull request #118 from juris-futura/add-find-command
2020-08-17 20:29:51 -07: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
0c7a62fc56 Add tests for findCommand 2020-07-29 19:18:36 -05:00
Diego Balseiro
9ad016c043 Add find using the runCommand operation 2020-07-29 00:19:09 -05:00
Victor Denisov
7f83416ddf Bump version 2020-04-07 20:37:49 -07:00
Victor Denisov
e98655a907 Fix error reporting for deletion of big messages
PR#115
2020-04-07 20:26:59 -07:00
Victor Denisov
69f5dd450f Format documentation
PR#113
2020-04-04 14:24:38 -07:00
Andrea Condoluci
9ce116b4bc Update Query.hs 2020-04-03 15:36:55 +02:00
Andrea Condoluci
1dc12beef3 Fix typo 2020-04-03 09:46:07 +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