@@ -2306,9 +2306,9 @@ defmodule Ecto.Repo do
23062306 end)
23072307
23082308 The return value is the same as of the given `fun` which must be
2309- `{:ok, result}` or `{:error, reason}`.
2309+ `:ok`, ` {:ok, result}` or `{:error, reason}`.
23102310
2311- If this function returns `{:ok, result}`, it means the transaction
2311+ If this function returns either `:ok`, or `{:ok, result}`, it means the transaction
23122312 was successfully committed. On the other hand, if it returns `{:error, reason}`,
23132313 it means the transaction was rolled back.
23142314
@@ -2324,8 +2324,8 @@ defmodule Ecto.Repo do
23242324 If an Elixir exception occurs the transaction will be rolled back
23252325 and the exception will bubble up from the transaction function.
23262326 If no exception occurs, the transaction is committed if the function
2327- returns ` {:ok, result}`. Returning `{:error, result }` will rollback the transaction
2328- and this function will return `{:error, result }` as well.
2327+ returns either `:ok` or ` {:ok, result}`. Returning `{:error, reason }` will rollback the transaction
2328+ and this function will return `{:error, reason }` as well.
23292329 A transaction can be explicitly rolled back
23302330 by calling `c:rollback/1`, this will immediately leave the function
23312331 and return the value given to `rollback` as `{:error, value}`.
@@ -2499,7 +2499,7 @@ defmodule Ecto.Repo do
24992499 """
25002500 @ doc group: "Transaction API"
25012501 @ callback transact ( fun :: ( -> result ) , opts :: Keyword . t ( ) ) :: result
2502- when result: { :ok , any ( ) } | { :error , any ( ) }
2502+ when result: :ok | { :ok , any ( ) } | { :error , any ( ) }
25032503 @ callback transact ( multi :: Ecto.Multi . t ( ) , opts :: Keyword . t ( ) ) ::
25042504 { :ok , map ( ) }
25052505 | Ecto.Multi . failure ( )
0 commit comments