PostgreSQL sequence nextval

https://hexdocs.pm/ecto/Ecto.Query.html#module-fragments

If you need an escape hatch, Ecto provides fragments (see Ecto.Query.API.fragment/1 ) to inject SQL (and non-SQL) fragments into queries.

1 Like