zookzook
MongoDB driver - an alternative MongoDB driver
Announcing an alternative MongoDB Driver! Do you like the MongoDB despite the general opinion a database always has to be an sql database? Would you like to use your favorite database with your favorite language? Then you are right here!
Sadly there is no official driver (I do not know why?). So you have to take things into your own hands and write the driver yourself. Currently the implementation does not support all features yet. But over time (hopefully) the succesive expansion of the missing features will take place.
Features:
- Supports MongoDB versions 3.2, 3.4, 3.6, 4.0
- Connection pooling (through DBConnection 2.x)
- Streaming cursors
- Performant ObjectID generation
- Follows driver specification set by 10gen
- Safe (by default) and unsafe writes
- Aggregation pipeline
- Replica sets
- Support for SCRAM-SHA-256 (MongoDB 4.x)
- Support for change streams api (See)
First Post!
Qqwy
Welcome to the forum, and thank you for sharing your hard work on this library!
From the GitHub Readme, it gather that mongodb_driver is a split-off with some different design decisions from the mongodb library.
Do you know how it compares to the other MongoDB-drivers that currently are floating around in the Elixir ecosystem? (mongo, mongodb_erlang, mongodb_client and mongox)
Most Liked
zookzook
The new version 0.6.0 has been released. Additional features since last announcing (May 4):
-
Support for bulk writes (See specs)
-
support for driver sessions (See specs)
-
support driver transactions (See specs)
-
Enhancements
- refactored
writeConcern - refactored
filter_nils - refactored usage of
ReadPreference - added support for sessions (
ServerSession,SessionPool,Session) - added Decimal128 encoder
- added support for transactions
- added support for transaction to gridfs and bulk operation
- added
createcommand (explicitly creating a collection or view) - Supports MongoDB versions 3.2, 3.4, 3.6, 4.0, 4.2
- refactored
Check the documentation for more information:
zookzook
Announcing a helper library to support using structs instead of bare maps while using the MongoDB-Driver:
Features:
- automatic load and dump function
- reflection functions
- type specification
- support for embedding one and many structs
- support for
after loadfunction - support for
before dumpfunction - support for id generation
- support for default values
- support for derived values
The module creates some boilerplate code, so you can use structs for your data. You call load/1 to convert the map from the driver to your struct. To save your struct to MongoDB you call dump/1 before you call insert_one or insert_many.
Check out the docs!
zookzook
let me say: tempus fugit.
mongox - DEPRECATED
mongo - 0.5.4 December 1, 2015 (docs)
mongodb_erlang - seems not to support op_msg (since 3.6)
Unfortunately, the libraries are not up-to-date regarding the MongoDB server. Since I use the latest version of my projects and therefore want to use the features of the server, I was looking for a suitable driver. Unfortunately I did not find one, so I searched for the best starting point and developed my own driver.
Last Post!
zookzook
The driver supports now zlib and zstd (thanks to silviucpp (Silviu Caragea) · GitHub for the Erlang bindings). You can use the master branch and activate the compression by appending compressors=zlib,zstd to the URL connection string. Details can be found here. I am currently testing the master branch. If nothing conspicuous occurs during the test phase, a new version 1.5.0 will be released on hex.pm.
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









