# `DripDrop.Repo`
[🔗](https://github.com/agoodway/dripdrop/blob/v0.1.0/lib/dripdrop/repo.ex#L1)

Thin delegating wrapper around the host-configured DripDrop repo.

Library code calls this module so applications can provide their own Ecto
repo through `config :dripdrop, :repo`.

# `all`

```elixir
@spec all(
  Ecto.Queryable.t(),
  keyword()
) :: [Ecto.Schema.t()]
```

Runs a query and returns all rows.

# `get`

```elixir
@spec get(module(), term(), keyword()) :: Ecto.Schema.t() | nil
```

Fetches one schema row by primary key, returning `nil` when it is missing.

# `get!`

```elixir
@spec get!(module(), term(), keyword()) :: Ecto.Schema.t()
```

Fetches one schema row by primary key, raising when it is missing.

# `insert`

```elixir
@spec insert(
  Ecto.Changeset.t(),
  keyword()
) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
```

Inserts a changeset through the configured repo.

# `one`

```elixir
@spec one(
  Ecto.Queryable.t(),
  keyword()
) :: Ecto.Schema.t() | nil
```

Runs a query expected to return zero or one row.

# `query`

```elixir
@spec query(String.t(), list(), keyword()) ::
  {:ok, Postgrex.Result.t()} | {:error, term()}
```

Executes raw SQL through the configured repo.

# `repo!`

```elixir
@spec repo!() :: module()
```

Returns the host-configured Ecto repo or raises when DripDrop is not configured.

# `transaction`

```elixir
@spec transaction(
  Ecto.Multi.t(),
  keyword()
) :: {:ok, map()} | {:error, atom(), term(), map()}
```

Runs an `Ecto.Multi` transaction through the configured repo.

# `update`

```elixir
@spec update(
  Ecto.Changeset.t(),
  keyword()
) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
```

Updates a changeset through the configured repo.

# `update_all`

```elixir
@spec update_all(Ecto.Queryable.t(), keyword(), keyword()) ::
  {non_neg_integer(), nil | [term()]}
```

Runs an `update_all` through the configured repo.

---

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