Commit graph

564 commits

Author SHA1 Message Date
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
Victor Denisov
ff0b0a31f3 Fix compilation of GHC 8.8 2020-02-08 19:39:21 -08:00
Victor Denisov
6d261afcab Bump version 2020-02-01 12:41:30 -08:00
Victor Denisov
82da003485 Add changelog entry 2020-02-01 12:40:31 -08:00
Neil Cowburn
99ceba43a0
Add support for snaked-cased hostnames 2020-02-01 08:27:20 +00:00
Victor Denisov
60c10bb5cc Bump version 2020-01-03 17:25:40 -08:00
Victor Denisov
993649bbc1 Add changelog entry 2020-01-02 20:28:16 -08:00
Victor Denisov
73cae15466 Open ReplicaSets over TLS 2020-01-01 20:34:31 -08:00
Victor Denisov
30ef4e1570 Fix compilation error 2020-01-01 20:33:37 -08:00
Victor Denisov
e71b361a75 Add changelog entry 2019-12-31 19:09:49 -08:00
Victor Denisov
7b5d85cca8 Unmask the forked thread in new pipeline 2019-12-31 15:44:05 -08:00
Victor Denisov
90448fb8ff Add changelog entry 2019-12-31 15:26:30 -08:00
Victor Denisov
e2e8288b32 Use MonadFail instead of Monad 2019-12-31 12:28:52 -08:00
Victor Denisov
a8bce6fd76 Add changelog entry 2019-12-31 11:45:57 -08:00
Neil Cowburn
bcfbcc2918
Add support for opening replica sets using v3.6-style connection strings 2019-11-19 11:21:13 +00:00
Neil Cowburn
d334d889ee
Add support for opening replica sets over TLS 2019-11-01 18:33:09 +00:00
Arnaud Spiwack
bd25f8bee3 Unmask the forked thread in newPipeline
The `newPipeline` function, used as part of `connect`, forks a
listener thread. Before this commit, the thread is forked with
`forkFinally`, where the thread action is run in the same mask as the
parent thread. The thread is then killed by a `killThread` when
closing a connection.

This is typically not a problem if the mask is “masked” (or,
obviously, “unmasked”), because the listener is generally blocked on a
channel at some time or other, and therefore will accept the
asynchronous exception thrown by `killThread`, and terminate.

However, if the mask is “masked uninterruptible”, then the listener
definitely doesn't receive asynchronous exceptions, and the
`killThread` calls hangs, and never returns.

One should probably never call `connect` in a “masked uninterruptible”
action. However, it sounds better to protect the mongoDB library
against the user accidentally doing so than to add a big warning
saying that calling `connect` in “masked uninterruptible” will cause
the program to hang down the line.

Therefore, this commit uses `forkIOWithUnmask`, in order to run the
thread action always in an “unmasked” state. In which case we can be
sure that we can always kill the listener thread regardless of the
client code.
2019-10-29 09:49:44 +01:00
Taylor Fausak
917fa0eb57 Use MonadFail instead of Monad 2019-10-04 12:10:24 -04:00
horus
4d1b2a0108 Add support for Unix domain socket connection
Update corresponding parser in readHostPortM
Update showHostPort
2019-09-11 14:08:22 +08:00
Victor Denisov
76d5f84f8a Bump version 2019-06-14 21:21:51 -07:00
Victor Denisov
33f2aca7b7 Merge: update to network 3.0
This PR introduces an abstraction layer that
builds a facade for network 2.8 and 3.0.

PR# 98
2019-06-14 20:12:50 -07:00
Scott Fleischman
ef1fc3875c Remove explicit default of _old-network flag.
Following 69378a0846
2019-06-12 08:57:53 -07:00
Scott Fleischman
f84cc03517 Add numeric instances that network's PortNumber has.
In particular this allows you to use `fromIntegral` without having to add the newtype wrapper. This can help existing code move away from importing and referencing the PortID type altogether.
2019-05-30 11:33:13 -07:00
Scott Fleischman
3334d819b4 Improve network versioning; add to benchmarks. 2019-05-30 10:52:25 -07:00
Scott Fleischman
996d3e196b Use same version check as in cabal file; fix typo in comment. 2019-05-30 10:28:23 -07:00
Scott Fleischman
17287b5556 Use network's connectTo when available. 2019-05-30 10:02:06 -07:00
Scott Fleischman
21cf023854 Add module Database.MongoDB.Internal.Network.
Add flag imitating bson package PR for network changes.
Add stack files for compilation checking.

Both ghc86 builds work. Still need to fix ghc84 and under builds with older network code.
2019-05-29 18:02:37 -07:00
Scott Fleischman
5bb77518a8 Revert "Remove use of conduit Producer and Consumer."
This reverts commit 5f04dc6a23.

Leave the use of Producer and Consumer for now until we drop support for conduit-1.2.*.
conduit-1.3 introduces ConduitT and deprecates the use of type synonyms.
However, ConduitT is not present in conduit-1.2.
2019-05-29 17:18:00 -07:00
Scott Fleischman
74a40411c1 Update shadowing warnings. 2019-05-29 17:07:29 -07:00
Scott Fleischman
b094dff057 Prefix internal unused fields with underscore.
Due to warning: [-Wunused-top-binds].
2019-05-29 17:03:03 -07:00
Scott Fleischman
5f04dc6a23 Remove use of conduit Producer and Consumer.
Due to deprecations: "Deprecated: Use ConduitT directly".
2019-05-29 17:01:50 -07: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
Scott Fleischman
13f56bbee4 Use ciphersuite_default instead of ciphersuite_all.
Due to this warning: "This ciphersuite list contains RC4. Use ciphersuite_strong or ciphersuite_default instead."
2019-05-29 16:52:37 -07:00
Scott Fleischman
44770450db Add .stack-work to .gitignore. 2019-05-29 16:30:24 -07:00
Victor Denisov
ea36d6fbb2 Bump version and add changelog entry 2019-03-03 17:38:18 -08:00