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

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.

Where Next?

Popular in Announcing Top

Eiji
ExApi is a library that I’m developing now and hope release soon This library will allow to: list all apis list all api implementation...
New
josevalim
Yes, yet another parser combinator library! Most of the parser combinators in the ecosystem are either compile-time, often using AST tra...
159 19228 141
New
blatyo
The best overview for how things are tied together is this presentation. Modules and functions are pretty well documented at this point, ...
New
pkrawat1
Presenting Aviacommerce, open source e-commerce platform in Elixir Aviacommerce is an open source e-commerce platform in Elixir. We at...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 42920 311
New
dbern
I’m excited to announce that TaxJar has developed and open-sourced DateTimeParser. We developed it because we found a need to parse user ...
New
mathieuprog
Hello :waving_hand: Allow me to introduce you to Tz, an alternative time zone database support to Tzdata. Why another library? First a...
New
ostinelli
Let’s write a database! Well not really, but I think it’s a little sad that there doesn’t seem to be a simple in-memory distributed KV da...
New
mtrudel
Bandit is an HTTP server for Plug and WebSock apps. Bandit is written entirely in Elixir and is built atop Thousand Island. It can serve...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New

Other popular topics Top

johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
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
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New

We're in Beta

About us Mission Statement