All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.4.1 (2024-05-02)
- improved the reconnection workflow (08d7fbc)
1.4.0 (2024-02-10)
- Compatibility changes to support mongodb_ecto adapter, thanks to https://github.com/brennana
- release 1.2.1 (0ef1482)
1.2.1 (2023-11-26)
- added support for read preference specified by the URL (#207) (9e4d569)
- applies the global timeout value to each query (#215) (64f8ea1)
- handle read preferences without tags (50ea98d)
- preserve the order of the keys (#211) (b360d87)
1.2.0 (2023-08-30)
- fixed typo (e6eff31)
1.1.0 (2023-07-30)
1.0.3 (2023-05-13)
- check if monitor pid exists before stopping (6e0c8b2)
- Add support of errInfo (#187)
- add support for the hint option (#175) (4c817b7)
- add telemetry start event to fix #174 (e79db9e)
1.0.2 (2023-01-02)
1.0.1 (2022-12-17)
- replace :code.priv_dir/1 function (da0fd6c)
1.0.0 (2022-11-27)
- add migration (da65de4)
- remove a bug in the hello handshake protocol (thanks to fireproofsocks for reporting) (59aa841)
- remove derived attributes in the dump function (c1b60b4)
- improve the dump and load functions (#154) (e7f2d44)
- use the same timestamps in new/0 function (0db61da)
- release 1.0.0 (64e274a)
- Bugfix
- fix a bug in the hello handshake protocol (thanks to fireproofsocks for reporting)
- Enhancements
- add migration
- Bugfix
- fix a crash in the streaming hello monitor, if the server sends more than one response at once
- add support for the new hello handshake
- refactor :timeout option (thanks to JD-Robertson for reporting)
- add timestamps macro to the collection module to handle inserted_at and updated_at attributes (thanks to carlosliracl)
- Bugfix
- add backward compatible for Elixir < 1.13 (thanks to ja-jimenez)
- Enhancements
- add colored log output
- add telemetry support for execution
- add new Repo module (thanks to daskycodes)
- add missing typespecs (thanks to fdie)
- refactor transaction api to support nested transaction
- add
Mongo.rename_collection/3
command
- Bugfix
- add missing excludes from dump function (collections)
- Bugfix
- fix no function clause matching (thanks to bodbdigr)
- Enhancements
- Remove a compiler warning (thanks to a-jimenez )
- Enhancements
- Fix for serializing BSON Regex without options (thanks to MillionIntegrals)
- Misc doc changes (thanks to kianmeng)
- Added support for OP_MSG exhaustAllowed flag
- Added support for streaming protocol
- Added Insights app for development ]()
- Enhancements
- replica set connection: faster topology update if the primary is down (thanks to p-mongo)
- added custom
Mongo.Encoder
protocol (thanks to esse) - added collection from yildun project
- fixed an issue that the bulk operation does not stop after any insert/update/delete failed (thanks to ja-jimenez)
- Enhancements
- added a new option to specify a timeout, when increasing the connection pool is no option
- Enhancements
- added support for OTP 24
- Add support for tls setting in connection string (tschmittni)
- Replace deprecated functions (OTP 24) (aenglisc )
- Enhancements
- Adds test to cover one of Mongo.find/4 errors (vukanac)
- Update specs for Mongo.find/4 with error tuple (vukanac)
- Fix build warnings and correct typespec (joeapearson)
- Update db_connection version to remove System.stacktrace warnings (vukanac)
- Update SCRAM auth procedure (LetThereBeDwight)
- Enhancements
- upgraded decimal to 2.0, jason to 1.2
- Add proper support for tailable cursors and awaitData (PR #74)
-
Enhancements
- refactored event notification system
- added support for retryable reads and writes
- refactored the test cases
- now using mtools for a MongoDB deployment in the travis ci environment
- travis ci uses only the latest MongoDB version The failCommand
Session.commit_transaction
returns now:ok
or an error{:error, %Mongo.Error{}}
-
Bugfixes
- Using
max_staleness_ms
> 0 results in a crash - Read preferences are sent to mongos
- Using
- Enhancements
- updated db_connection dependency
- generalize inconsistent typespecs
- new function
BSON.ObjectId.decode/1
andBSON.ObjectId.encode/1
- new function
Mongo.uuid/1
- Bugfixes
- fixed bug in
Mongo.TopologyDescription
in case of a shard cluster deployment (#39)
- fixed bug in
-
Enhancements
- basic support for inserting structs
- removed duplicated code
- Cursor-API raises a
Mongo.Error
instead of aFunctionClauseError
-
Bugfixes
:appname
option (typo) #38- fixed index creation in
Mongo.GridFs.Bucket
- Enhancements
- refactored the api of
Mongo.limits
andMongo.wire_version
- add support for tracking recovery token from response in a sharded transaction
- refactored the api of
- Enhancements
- refactored
Mongo.Session
andMongo.Session.SessionPool
because of poor performance
- refactored
- Enhancements
- refactored
writeConcern
- refactored
filter_nils
- refactored usage of
ReadPreference
- added support for sessions (
ServerSession
,SessionPool
,Session
) - added support for transaction
- added Decimal128 encoder
- added support for transaction to gridfs and bulk operation
- added
create
command (explicitly creating a collection or view)
- refactored
-
Bug Fixes
- Test for existing index in
Bucket
works right now
- Test for existing index in
-
Enhancements
- Better handling for the
:timeout
options
- Better handling for the
-
Bug Fixes
- Fixed a match error in
after_fun
of cursor module - Fixed a match error in the result of function
Monitor.force_check
- Resolved decode problem for the Binary (Old) BinData subtype
- Fixed a match error in
-
Enhancements
- Added support for
Mongo.BulkWriteResult
- Added support for
- Bug Fixes
- Fixed a match error when using Windows OS
- Enhancements
- The driver provides now client metadata
- Added support for connecting via UNIX sockets (
:socket
and:socket_dir
) - Added support for bulk writes (ordered/unordered, in-memory/stream)
- Added support for
op_msg
with payload type 1 - Merged code from https://github.com/ankhers/mongodb/commit/63c20ff7e427744a5df915751adfaf6e5e39ae62
- Merged changes from elixir-mongo/mongodb#283
- Merged changes from elixir-mongo/mongodb#281
-
Enhancements
- Travis now using the right MongoDB version
-
Bug Fixes
- Added test unit for change streams
- Removed debug code from change streams
- Enhancements
- Added
op_msg
support (See) - Fixed change streams in case of error codes: 11601, 136 and 237 from resuming
- Reorganized error handling
- Added
- Enhancements
- Upgraded to DBConnection 2.0.6
- Refactored code, simplified code and api
- Replaced deprecated op_code by database commands
- Update_one, update_many, replace_one, replace_many return upserted ids
- Add support for all find options
- Add support for MongoDB 3.6 collection Change Streams
- Ass support for SCRAM-SHA-256 (MongoDB 4.x)
-
Enhancements
- Added hostname and port to exceptions
- Added support for x509 authentication
- Allow passing only partial
read_preference
information - Add support for GridFS
-
Bug Fixes
- Fixed a connection leak
- Properly parse write concern for URL
- Properly follow read preference for
secondary_preferred
- Enhancements
- Added 4.0 to supported versions
- Initial support for mongodb+srv URLs
- Support for Decimal128
- Enhancements
- Added
:connect_timout_ms
toMongo.start_link/1
- Reorganized documentation
- Added
-
Enhancements
- Should now be able to send a query to your server before the connection is fully made
-
Bug Fixes
- Should actually be able to query for longer than 5 seconds
-
Enhancements
- Added support for using a mongo url via the
:url
key - Added MongoDB 3.6 to supported versions
- Added support for the deprecated
undefined
BSON type
- Added support for using a mongo url via the
-
Bug Fixes
- Added another case for BSON NaN
- Fixed encoding and decoding of the BSON Timestamp type
- Should now figure out Topology for replica sets even if you exclude the
:type
key - Fixed an issue where our monitors would become empty, preventing the driver from reconnecting to a downed database
-
Enhancements
- Send TLS server name indication (SNI) if none is set in the
:ssl_opts
- Fixed a couple dialyzer issues
- Add basic examples of
$and
,$or
, and$in
operators in README
- Send TLS server name indication (SNI) if none is set in the
-
Bug Fixes
- Ensure cursor requests are routed to the proper node in the cluster
- No longer attempting to authenticate against arbiter nodes
- Prevent monitor errors if you have stopped the mongo process
- Bug fixes
- Fix application crash when a replica set member goes offline
- Fix application crash on start when a replica set member is offline
- Bug fixes
- Monitors no longer use a pool
- Can now connect to a Mongo instance using a CNAME
- Pass options through Mongo.aggregate/4
- Replica Set Support
- Breaking changes
- Remove
BSON.DateTime
and replace it with native ElixirDateTime
- Remove
-
Enhancements
- SSL support
- Add functions
BSON.DateTime.to_elixir_datetime/1
andBSON.DateTime.from_elixir_datetime/1
-
Changes
- Requires Elixir ~> 1.3
-
Enhancements
- Add
BSON.ObjectID.encode!/1
andBSON.ObjectID.decode!/1
- Optimize and reduce binary copying
- Add tuple/raising versions of functions in
Mongo
- Add
:inserted_count
field toMongo.InsertManyResult
- Support NaN and infinite numbers in bson float encode/decode
- Add
Mongo.object_id/0
for generating objectids - Add
Mongo.child_spec/2
- Add
Mongo.find_one_and_update/5
- Add
Mongo.find_one_and_replace/5
- Add
Mongo.find_one_and_delete/4
- Add
-
Bug fixes
- Fix float endianness
-
Breaking changes
- Switched to using
db_connection
library, see the current docs for changes
- Switched to using
-
Enhancements
- Add
BSON.DateTime.from_datetime/1
- Add
-
Bug fixes
- Fix timestamp epoch in generated object ids
- Fix
Mongo.run_command/3
to accept errors without code
Initial release