In Elixir, the pin operator is used to prevent variable rebinding. However, with regard to an Ecto query like
from u in User, where: u.username == ^username
the authors of Programming Phoenix state (in chapter 7) that
Remember, the ^ operator (called the pin operator) means we want to keep ^username the same.
But this doesn't sound right, because apparently, the comparison in the query shall not cause any rebinding of variables.
Are the authors of the book (which José Valim co-authored) mistaken? Is the pin operator in Ecto queries merely a construct of the Ecto DSL instead of a usual Elixir pin operator? Or will the query really get a chance to rebind username
after the macros are expanded?