I’m working on tightening up my Ecto skills and I wanted to post a question just to see if someone could give me a '“why” on a particular thing. I find that I have an easier time remembering things if I know the logic behind the way something is constructed.
I’m curious why the from clause in an Ecto query puts the alias first and then the table name. In SQL it’s the other way round:
Table t
vs.
from t in “table”
I’m sure there’s an excellent reason for this–likely something to do with the macros underlying Elixir but I just felt like indulging my curiosity a bit and asking this here.
Edit: I just realized I got my terminology backwards. Alias precedes table name