zookzook

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)

More information, sources and packages:
github hex.pm

First Post!

Qqwy

Qqwy

TypeCheck Core Team

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

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 create command (explicitly creating a collection or view)
    • Supports MongoDB versions 3.2, 3.4, 3.6, 4.0, 4.2

Check the documentation for more information:

zookzook

zookzook

Announcing a helper library to support using structs instead of bare maps while using the MongoDB-Driver:

Hex.pm
Github
Demo

Features:

  • automatic load and dump function
  • reflection functions
  • type specification
  • support for embedding one and many structs
  • support for after load function
  • support for before dump function
  • 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

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

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.

Where Next?

Popular in Announcing Top

mischov
import Meeseeks.CSS html = HTTPoison.get!("https://news.ycombinator.com/").body for story <- Meeseeks.all(html, css("tr.athing")) do...
New
pkrawat1
Hey guyz We at @aviabird are working on a payment library in elixir/phoenix. We are targeting March 2018 to add 56 Gateways to it. Have...
New
kip
ex_cldr provides localisation and internationalisation support based upon the data from the Unicode CLDR project. Unicode released CLDR ...
407 13366 120
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44778 311
New
ityonemo
Currently just starting out on a new mini-project - getting zig NIFs to run in elixir. https://github.com/ityonemo/zigler The idea here...
New
maltoe
Hello! Came here to announce ChromicPDF, a pet project PDF generator I’ve been working on for the past few months. Why another PDF gener...
New
benlime
LiveMotion enables high performance animations declared on the server and run on the client. As a follow up to my previous thread A libr...
New

Other popular topics Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement