Tag Archives: Ecto

The right way to change column to nullable with modify in Ecto migration? – JavaScript Developer

The right way to change column to nullable with modify in Ecto migration? DEV Community – A constructive and inclusive social community for software program developers. With you each step of your journey. Constructed on Forem — the open source software program that powers DEV and different inclusive communities. Made with love and Ruby on…

Read More

How database transactions work in Ecto and why Elixir makes it superior? – Developer

How database transactions work in Ecto and why Elixir makes it superior? Immediately we will take a look at how Ecto, which is Elixir’s first-choice database entry library, addresses the difficulty of dealing with database transactions. We’ll briefly introduce you to the very idea of transaction, then give attention to describing the Ecto approach of…

Read More

Validando associações com Ecto: put_assoc vs cast_assoc – Developers Feed

Validando associações com Ecto: put_assoc vs cast_assoc Recentemente fazendo algumas refatorações de código, identifiquei um problema onde a validação de alguns changesets não estavam funcionando, e olhando a implementação tudo estava aparentemente correto: def create_user(params) do User |> User.changeset(params) |> put_assoc(:personal_info, params.personal_info) |> Repo.create() end Enter fullscreen mode Exit fullscreen mode Debugando o código, vi…

Read More

Elixir Wizards Talk: “Dealing With a Monster Ecto Query” – Developers Feed

Elixir Wizards Talk: “Dealing With a Monster Ecto Query” Last month, I spoke at the first-ever Elixir Wizards Conference. It was a lightning talk walking through a refactor I did before the 2020 US Presidential Election, titled “Dealing With a Monster Ecto Query.” I work for a news company, so the presidential election is a…

Read More