Search⌘ K
AI Features

Drawbacks of Using Functions

Explore the drawbacks of using functions for Ecto transactions such as error handling difficulties and limited function composability. Understand why careful use of Repo calls is critical and prepare to learn how Ecto.Multi addresses these challenges in managing multiple database changes.

We'll cover the following...

Running transactions with functions works reasonably well, but has some drawbacks:

  • The most serious problem, demonstrated in the last section, is that we have to be careful that we call Repo functions in the correct way. When we call insert
...