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
d43b63d305
Merge pull request #73 from VictorDenisov/merge_gridfs
...
Merge gridfs
2016-11-25 20:20:02 -08:00
Victor Denisov
ae64ee6e4e
Fix haddock errors
2016-11-21 20:49:44 -08:00
Victor Denisov
3e08136509
Add GridFS implementation.
...
This code is merged from: https://github.com/btubbs/haskell-gridfs
2016-11-20 19:23:47 -08:00
Sibi Prabakaran
7fcebcbb0a
Add type signatures and extension in code
...
Fixes #71
2016-11-07 21:13:56 +05:30
Victor Denisov
746e670bf0
Drain remaining var in response queue
2016-10-30 00:08:40 -07:00
Victor Denisov
04e5dd3248
Return error if listening thread is closed
2016-10-30 00:08:40 -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
66bed533fe
Add documentation for Transport module
2016-06-21 02:19:02 -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
7fc095725f
Make psend's argument message strict ( #55 )
...
If the message argument can't be evaluated successfully
strict modifier will keep those errors outside of
psend invocation. Psend will catch only actual IO exceptions.
2016-06-02 07:46:24 -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
Victor Denisov
8132604443
Add warning about experimental TLS support
2016-05-03 23:43:55 -07:00
Victor Denisov
5ca93be5e8
Drop io-region dependency
2016-05-03 23:02:54 -07:00
Victor Denisov
e38ec59d1e
Move Tls module to Transport
2016-05-02 22:05:02 -07:00
Victor Denisov
89ee88e67c
Rename Internal.Connection module to Transport
2016-05-02 21:30:00 -07:00
Victor Denisov
ccd6727ab4
Use conventional types for Tls.Connect
2016-05-01 19:24:40 -07:00
Victor Denisov
a4e5726e1e
Clean up redundant warnings
2016-05-01 19:11:02 -07:00
Victor Denisov
655f4b90bc
Rename readExactly to read
2016-05-01 19:05:51 -07:00
Victor Denisov
73dfdb0b7f
Remove IOStream from Internal.Protocol
2016-05-01 18:17:22 -07:00
Victor Denisov
c011b1a23c
Move content of System.IO.Pipeline to Internal.Protocol
2016-05-01 17:34:06 -07:00
Victor Denisov
f956cb2623
Incorporate Tls implementation
2016-05-01 16:15:08 -07:00
Victor Denisov
19e631c9f4
Implement readExactly using hGet
2016-04-30 14:08:19 -07:00
Victor Denisov
494bdcbe56
Add tls implementation
2016-04-30 14:08:19 -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
Wojtek Narczyński
4fbabd19db
Update MongoDB.hs
...
Correct mispelled language extension in comment.
2015-10-19 15:39: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
68ed7beb56
Remove unused writeLazy
2015-08-31 18:04:00 -07:00
Victor Denisov
e45d9329e9
Address performance issues with insert
...
Compile notices and request into one strict string for performance
boost.
2015-08-29 22:37:05 -07:00
Greg Weber
f385dade31
Merge pull request #25 from VictorDenisov/master
...
Handle the case when mongodb returns less documents than cursor reque…
2015-07-31 17:59:04 -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
Ralph Morton
9087719087
Support for TTL
2015-06-19 18:26:38 +02: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
98bcc2dfe8
abstract connection interface
...
rebase #13 to master
2015-03-05 11:21:58 -08: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
1e861c2496
Make examples compilable
2014-07-07 09:05:03 +04: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
Michael Snoyman
bd3d90f740
Rename Context to MongoContext
2013-12-26 17:24:15 +02:00
Michael Snoyman
caab81a54e
Get rid of usage of ErrorT
2013-12-26 17:23:02 +02:00
Michael Snoyman
756c9181cb
Replace hard tabs with spaces
2013-12-26 16:57:33 +02:00
Edward Z. Yang
4ce8a44011
Fix some warnings.
...
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
2013-11-06 23:15:50 -08:00
Edward Z. Yang
5656f90c27
Convert to use hashtables, as Data.HashTable went away.
...
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
2013-11-06 23:04:16 -08:00
Greg Weber
57722a7d43
handle findAndModify edge cases
...
also give better error messages
2013-08-29 11:57:07 -07:00
Greg Weber
45a0e8e9e2
add findAndModify command
2013-06-06 08:00:00 -07:00
Timo von Holtz
83cae75efc
Added Support for Aggregate Framework
2013-05-24 00:15:56 +02:00
Fedor Gogolev
46b3f1f3fa
Support for network 2.4.1
2013-01-21 02:08:20 +04:00
Amit Aryeh Levy
5ce857a4db
Make sure 7.6 modifications stil compile with 7.4
2012-10-23 16:49:29 -04:00
Amit Aryeh Levy
ed0c264a35
GHC 7.6 Support
...
lifted-base no longer contains addMVarFinalizer
2012-10-19 02:29:10 -07:00
Michael Snoyman
681f9f875f
GHC 7.6 support
2012-09-10 20:25:45 +03:00
Fedor Gogolev
4ae4f793e3
Function eval
returns Val v
instead of Document
...
Fixes #1
2012-07-09 08:26:58 +04:00
Fedor Gogolev
dd6a3010f6
Cleaned up imports
2012-06-10 23:47:14 +04:00
Fedor Gogolev
17f528e835
Use text instead of compact-string-fix
2012-05-08 19:13:25 +04:00
Greg Weber
b706780844
use -fno-warn-orphans
2012-02-29 11:35:55 -08:00
Andrew Miller
d3f54922cc
Add routedHost as an alternative to primary / secondaryOk that lets the user supply their own sort function. This is useful for applications like preferentially connecting to the host or secondary that is geographically the closest.
2012-02-12 17:34:07 +13:00
Tony Hannan
5e015dc769
Merge pull request #14 from yesodweb/show-AccessMode
...
show instance for AccessMode
2012-01-28 15:50:53 -08:00
Greg Weber
6ef19663cf
show instance for AccessMode
2012-01-27 12:48:54 -03:00
Tony Hannan
2f23e78c28
Use MVar from lifted-base
2012-01-23 20:45:10 -05:00
Tony Hannan
d0aeb42e7c
merge duplicate code
2012-01-23 19:45:42 -05:00
Michael S. Craig
fa95b65fad
Fix for bad behavior when using TailableCursor.
...
`Database.MongoDB.Query.next` and `nextBatch` prefetch a promise of the next
batch of documents from the server whenever the current batch has been
exhausted. The following call to `next` or `nextBatch` fulfills that promise
(thereby turning it into a concrete batch of documents) and then returns one or
more documents in the batch.
The old behavior was to raise an exception if an empty batch with a nonzero
cursor ID was encountered. This is normal when using tailable cursors, so a
change was required.
Now, `Nothing` is returned with the still-live cursor ID, instead of raising
the exception. Also, prefetched empty batches with nonzero cursor IDs are
refetched once per call to avoid stale data.
This new prefetching behavior does not affect the performance of `next`, except
when calling it repeatedly on a tailable cursor with no new data. In those
(generally avoidable) cases, each call to `next` results in two server calls
instead of one.
2011-12-13 11:02:57 -05:00
Nathan Howell
b18f81f431
Updating to monad-control-0.3, with help from Bas van Dijk.
...
Conflicts:
Database/MongoDB/Query.hs
2011-12-05 09:23:39 -08:00
Tony Hannan
d506011cd1
fix some warnings. bump version for previous 7.2.1 compatibility fix
2011-11-10 10:23:07 -05:00
Ryan Trinkle
ccd217053b
fix missing record field in P.Request value
...
the fields of a Database.MongoDB.Internal.Protocol.Query were not filled in by RecordWildcard on line 411 of Database/MongoDB/Query.hs because the record fields were not in scope
2011-10-27 15:24:37 -04:00
Tony Hannan
efb6b65506
QueryFailure error code
2011-09-07 12:09:20 -04:00
Michael Snoyman
a320c363e4
Move to monad-control
2011-08-25 16:29:39 +03:00
Tony Hannan
4307fea5aa
collect ids from insert lazily in case not used
2011-08-18 19:41:32 -04:00
Tony Hannan
e152f5b69b
use ExtendedDefaultRules in example
2011-07-30 12:49:37 -04:00