Closed esse closed 4 years ago
I like the idea. How you do decoding back to domain structs?
@deadtrickster thanks! Right now, we're decoding them manually - and I believe there is no such elixir idiomatic way of doing that, such as here.
yeah I think it is ecto territory. we should look into it.
Hi,
This PR adds a feature:
Mongo.Encoder
protocol.In our project, we very often spot a case when we need to insert map, generated from some struct into the mongo database. With that PR, instead of writing a custom glue code, we can simply implement
Mongo.Encoder
protocol. Which in turns results in clearer, more idiomatic Elixir code.