Execute Non-Database Operations with Multi
Learn how to execute non-database operations with Multi.
We'll cover the following...
Using functions with Multi
Based on what we’ve seen of Multi
so far, it might appear that executing transaction
with functions has one clear advantage—functions allow us to run any Elixir code within the transaction. Recall our earlier example of updating a search engine within a transaction
call. Fortunately, Multi
offers this functionality as well. The run
function allows us to add any named or anonymous function as ...