Uni — Ecto Plugin [upd]

Traditional Ecto testing uses Sandbox and explicit repo calls. With Uni, you have testing options:

def list_users_raw do Repo.query("SELECT * FROM users") # DANGER: This ignores the prefix! end uni ecto plugin

config :uni, default_repo: MyApp.Repo

Trying to compose Repo.transaction/1 with other side effects (HTTP calls, file writes) is error-prone. Uni’s Step system handles transactions declaratively. Traditional Ecto testing uses Sandbox and explicit repo

def only_deleted(queryable) do Ecto.Query.where(queryable, [q], not is_nil(q.deleted_at)) end end uni ecto plugin

Ecto returns :error, changeset . But what about validation errors vs. database constraint errors vs. connection errors? Uni normalizes all Ecto errors into a standard Uni.Error.t() structure.