NoSQL adapters for Ecto: weeks 8 & 9

6 views
Skip to first unread message

Michał Muskała

unread,
Jul 26, 2015, 5:35:32 PM7/26/15
to beam-co...@googlegroups.com, elixi...@googlegroups.com
Hello everybody,

Somehow I've missed report for the last week, so this will be a double one.

During those two weeks, I focused mainly on Ecto itself. As planned I
worked on embedded models
and all things related. In total it's over 30 commits adding proper
handling for embedded models in
casting, changesets, callbacks, primary key autogeneration, loading
and dumping, and many bugfixes
related to these.
This hasn't left much time to work on the MongoDB adapter, and I was
mainly keeping it up to date with
latest Ecto changes - new migrations (table and column rename), new
loading/dumping functions, and
push and pull update operators among others.
One new feature introduced this week is ability to do partial updates
in nested maps and arrays:

MyRepo.update!(Post, set: [meta: change_map("some.nested.field",
"new value")])
MyRepo.update!(Post, set: [comments: change_array(0,
"author.name", "Michal")])

As previewed earlier, all the work on embedded models, was preparing
Ecto to handle nested
changesets (updating associations together with the main model), and
that's what I intend to focus
on this week. Another thing I would like to do is partial updates for
embedded models in the
MongoDB adapter (currently all the embedded model data is sent to the
database even if only a
single field changed - we can avoid it). There are provisions for it
on the ecto side, but some
more work is needed.

Furthermore, yesterday was exactly two months since I started the
project. The third, and unfortunately
last, month has begun. That said majority of the tasks previewed for
the project are finished. There
are some additional things I would like to help with in Ecto, and some
minor features in the
MongoDB adapter itself, but it's highly probable the project will be
finished on time, or even before that.
Of course, the big thing left is the hex package release - I really
hope we'll be able to achieve that this week.

Have a great day,
Michał.
Reply all
Reply to author
Forward
0 new messages