Ecto.Adapter.Transaction.transaction
You're seeing just the callback
transaction
, go back to Ecto.Adapter.Transaction module for more information.
Specs
transaction(adapter_meta(), options :: Keyword.t(), function :: (... -> any())) :: {:ok, any()} | {:error, any()}
Runs the given function inside a transaction.
Returns {:ok, value}
if the transaction was successful where value
is the value return by the function or {:error, value}
if the transaction
was rolled back where value
is the value given to rollback/1
.