2 ms·
I normally dislike ORMs, but Elixir's Ecto has changed my mind on it. It's a DSL that is very close/similar to SQL, enough so that it feels to me like writing
by freedomben 4y ago
I normally dislike ORMs, but Elixir's Ecto has changed my mind on it. It's a DSL that is very close/similar to SQL, enough so that it feels to me like writing SQL. IMHO it's the best of both worlds because it's close to SQL but it returns rich Elixir Structs and provides exceptions/error handling in an idiomatic way for the language.
- h0l0cube 4y agoEcto is more than a typical ORM. You can map queries into arbitrary structures, which permits arbitrary joins and selects. It also provides better mechanisms for validation for insert/update that go beyond enforcing type annotations