Quantcast
Channel: Why are pin operators necessary in Ecto queries? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Mladen Jablanović for Why are pin operators necessary in Ecto queries?

Ecto's queries rely on macros to provide the powerful DSL that we use. That means that, whatever comes after from, is not "regular" Elixir code, but a DSL which will eventually get transformed to SQL...

View Article


Answer by Nimir for Why are pin operators necessary in Ecto queries?

According to Ecto documentation, the pin operator in ecto is used for query interpolation:External values and Elixir expressions can be injected into a query expression with ^def with_minimum(age,...

View Article

Why are pin operators necessary in Ecto queries?

In Elixir, the pin operator is used to prevent variable rebinding. However, with regard to an Ecto query likefrom u in User, where: u.username == ^usernamethe authors of Programming Phoenix state (in...

View Article
Browsing latest articles
Browse All 3 View Live