Uni Ecto Plugin →

def not_deleted(query) do from q in query, where: is_nil(q.deleted_at) end end

field :uuid, UniEctoPlugin.Types.UniID field :meta, UniEctoPlugin.Types.UniJSON uni ecto plugin

query = where(query, [p], uni_origin(p.customer_uni) == "stripe") def not_deleted(query) do from q in query, where: is_nil(q

Uni Ecto Plugin offers a clean, extensible, and Elixir‑idiomatic way to add cross-cutting database behaviours. By moving from ad‑hoc macros to a standard behaviour -based plugin system, we reduce boilerplate, improve composability, and keep Ecto’s explicit philosophy intact. We invite the community to contribute plugins and feedback. where: is_nil(q.deleted_at) end end field :uuid

┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ SoftDelete │ │ Encryption │ │ AuditTrail │ │ Plugin │ │ Plugin │ │ Plugin │ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │ │ │ └──────────────────┼──────────────────┘ ▼ ┌──────────────────┐ │ Uni.Plugin.Engine│ (compile-time) └────────┬─────────┘ ▼ Your Ecto.Schema (with plugin calls)

def init(default), do: default