Design discussion - Ecto is your application

I think this is a good thing honestly. I love that you can write your own queries in Ecto and you don’t have to rely on some higher-level abstractions that ORMs from languages like c#/java offer. The problem with those types of ORMs is that they are opinionated in a lot of the decisions, not flexible enough and not extensible.

I always tend to showcase how easily ecto queries can be extended:

  defmacro st_transform(wkt, srid) do
    quote do: fragment("ST_Transform(?, ?)", unquote(wkt), unquote(srid))
  end

Good luck implementing that with an ORM that tries to abstract everything.

1 Like