# `DoubleDown.Repo.Impl.MultiStepper`
[🔗](https://github.com/mccraigmccraig/double_down/blob/main/lib/double_down/repo/impl/multi_stepper.ex#L10)

Steps through an `Ecto.Multi` without a real database transaction.

Used by `DoubleDown.Repo.Stub` and `DoubleDown.Repo.OpenInMemory` to execute
Multi operations in order, accumulating a changes map.

The `repo_facade` argument is passed to `:run` callbacks as the
first argument (the "repo"), mirroring how Ecto passes the Repo
module to `Ecto.Multi.run/3` callbacks.

## Return values

  * `{:ok, changes}` — all operations succeeded
  * `{:error, name, value, changes_so_far}` — an operation failed

# `changes`

```elixir
@type changes() :: %{optional(any()) =&gt; any()}
```

# `run`

```elixir
@spec run(Ecto.Multi.t(), module()) ::
  {:ok, changes()} | {:error, any(), any(), changes()}
```

Execute all operations in the given `Ecto.Multi`.

`repo_facade` is the module passed to `:run` callbacks as the repo
argument — typically the `Repo facade` module so callbacks can call
`repo.insert/1`, `repo.get/2`, etc.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
