Hacker News new | ask | show | jobs
by perishabledave 2776 days ago
One thing worth highlighting in the post is that Phoenix now uses Ecto 3.0. This latest version of Ecto separates Ecto's data mapping and validation from Ecto's SQL adapters. Practically this means you can use Ecto's changesets when you either don't need persistence or aren't using a SQL database.

Additionally there are a number of features that make Ecto 3.0 a great release: http://blog.plataformatec.com.br/2018/10/a-sneak-peek-at-ect...

2 comments

The best one is piping aggregate and other functions in queries!

Something like:

from foo in Foos, select: foo.id |> filter(foo.bar > 3) |> count()

I've used Ecto in the past to build API validation, so having Ecto and its DB adapters separated is a great move in my opinion.