MongoDB driver - an alternative MongoDB driver

Thank you for continuing work on this project.

1 Like

The new release candidate 0.9.0-rc0 has been released:

  • add colored log output
  • add telemetry support for execution duration
  • 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
2 Likes

The new release 0.9.0 has been released:

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
1 Like

The mongodb driver supports MongoDB 6.x as well!

3 Likes

The new version 0.9.2 has been released:

Bugfix:

  • fix a crash in the streaming hello monitor, if the server sends more than one response at once
  • refactor :timeout option (thanks to JD-Robertson for reporting)

Enhancements:

  • add support for the new hello handshake
  • add timestamps macro to the collection module to handle inserted_at and updated_at attributes (thanks to carlosliracl)
3 Likes

The new version 1.0.0 has been released:

Enhancements:

  • add migration (da65de4)
  • improve the dump and load functions (#154) (e7f2d44)
  • use the same timestamps in new/0 function (0db61da)

Bugfix:

  • remove a bug in the hello handshake protocol (thanks to fireproofsocks for reporting) (59aa841)
  • remove derived attributes in the dump function (c1b60b4)

Breaking changes - Mongo.Repo and Collections Module

Prior to version 0.9.2 the dump/1 function returns atoms as key. Since the dump/1 function is the inverse function of load/1, which uses binary keys as default, the dump/1 function should return binary keys as well.

Prior to version 0.9.2 some Mongo.Repo functions use the dump/1 function for the query (and update) parameter. This worked only for some query that used only the attributes of the document. In the case of nested documents, it didn’t work, so it is changed to be more consistent. The Mongo.Repo module is very simple without any query rewriting like Ecto does. In the case you want to use the :name option, you need to specify the query and update documents in the Mongo.Repo functions following the specification in the MongoDB.

If you upgrade the driver to version 1.0.0 and you use the collection feature, please check you code!

5 Likes

The new version 1.4.0 has been released! Thanks to brennana (Andy Brennan) · GitHub for the work to support the mongodb_ecto adapter. Now you can use the mongodb_ecto package with MongoDB 6.x/7.x!