What does this bracket mean in join function?

Here’s the example of my question.

|> join(:inner, [c], p in Post, on: c.post_id == p.id)

what does the bracket means in that function?
I mean why does it uses the bracket in the second argument?

It’s called a binding. It lets you refer to the fields in previously defined entities. These docs explain it very well: Ecto.Query — Ecto v3.9.0

1 Like