Ecto.Repo.checkout
You're seeing just the callback
checkout
, go back to Ecto.Repo module for more information.
Specs
checkout((() -> result), opts :: Keyword.t()) :: result when result: var
Checks out a connection for the duration of the function.
It returns the result of the function. This is useful when you need to perform multiple operations against the repository in a row and you want to avoid checking out the connection multiple times.
checkout/2
and transaction/2
can be combined and nested
multiple times. If checkout/2
is called inside the function
of another checkout/2
call, the function is simply executed,
without checking out a new connection.
Options
See the "Shared options" section at the module documentation for more options.